Skip to Content
avatar image
Former Member

Passing data from 2 different tables into Stored procedure as parameters.

Dear Experts,

Please see the following query.

Declare @SerType varchar(50),@Branch varchar(50)

set @SerType=(select top 1 U_Service from OITM where U_Service='[%0]')

set @Branch=(select distinct U_Branch from DLN1 where U_Branch='[%1]')

EXEC [ATO_SP_S] @SerType,@Branch

In this, [ATO_SP_S] is stored procedure name and U_Service,U_Branch are UDFs fields in Marketing Document.

If I run this query with only 1 parameter (whatever @SerType @Branch), stored procedure is run correctly.

But when I run with 2 parameter, there is no results.

Please help me. These 2 parameter are needed to run SP.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers