Connected parameters using MSSQL

(3 posts) (2 voices)
  1. chiacy, Member

    I was trying to get the connected parameters working on MSSQL however I can't manage to get it right.

    I have booking table linked to client, where client table linked to organisation, i.e.

    organisation table
    --> organisationid
    --> organisationname

    client table
    --> clientid
    -->clientname

    booking
    -->clientid
    -->bookingreferencenuber

    I wanted to select the organisation, then select client based on organisation selected above, then list bookingreferncenumbers related to the client above.

    I have set up parameter query below,

    1. test_market, pop_up

    select organisationid as id, organisationname as name from sql2.tslive.dbo.organisation

    2. test_client, pop_up

    create PROCEDURE [dbo].[sp_ADBR_client_select]
    @mydbr_param1 int
    AS

    begin

    select
    clientid as id,
    clientname as name
    from sql2.tslive.dbo.client
    where organisationid=@mydbr_param1

    and the main stored procedure as below:

    ALTER PROCEDURE [dbo].[sp_DBR_test_connected_params]
    @inMarket int,
    @inClient int
    AS

    begin

    select bookingreferencenumber from sql2.tslive.dbo.booking
    where clientid=@inClient

    end

    however, I keep having issue where MSSQL asking for value when calling sp_ADBR_client_select in parameter query

    please help to point out where have I gone wrong.

    thanks

  2. myDBR Team, Key Master

    The code looks perfectly ok. (You could use @inClient directly instead of @mydbr_param1, but that is not what is causing your problem.)

    How does your parameter query definitions look like?

    --
    myDBR Team

  3. chiacy, Member

    this is working now after updating accordingly


Reply

You must log in to post.