cancel
Showing results for 
Search instead for 
Did you mean: 

passing variable in reports

Former Member
0 Kudos

how can i pass variable to stored procedure. i am looking for varchar, datetime i know. but i want to pass names and currency how can i do that.

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

From where would you be calling this stored procedure and where are these parameters?

Former Member
0 Kudos

i will be calling this store procedure from SAP query manager.

Former Member
0 Kudos

the parameters are passing from SAP query manager to stored procedure.

example

DECLARE @Dt1 DATETIME

DECLARE @Dt2 DATETIME

-- SELECT FROM [dbo].[ODLN] T0 WHERE T0.TAXDATE =

SET @Dt1 = '[%0]'

-- SELECT FROM [dbo].[ODLN] T0 WHERE T0.TAXDATE =

SET @Dt2 = '[%1]'

EXEC [@xxx_locations_sales] @Dt1,@Dt2

kvbalakumar
Active Contributor
0 Kudos

Try like this:

Set @variable = (select field from table where condition = [%0])

Regards,

Bala

Answers (0)