I have the following simple sql query which is part of longer SQL query .
I want to run the entire query in SBO .
question : How to replace SQL parameters in the query by SBO Parameters ( [%0] )
declare @start date = convert (date,'01/01/2017',103),
@end date = convert (date,'01/12/2017',103) ;
select convert (date,t0.DocDate,103) AS DocDate ,
'curentPeriod ' as curentPeriod, t0.DocTotal as DocTotal , t0.CardCode as cardCode, T0.SlpCode as Splcode
from OINV t0
where T0.DocDate between @start and @end
and t0.CardCode <>3000001
union all
select convert (date,t0.DocDate,103) AS DocDate ,
'curentPeriod ' as curentPeriod,
t0.DocTotal as DocTotal ,
t0.CardCode as cardCode,
T0.SlpCode as Spl from ORIN t0
where T0.DocDate between @start and @end
and t0.CardCode <>3000001 ;
Add comment