Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
thanks in advance
Hi,
Its been a long time, but may be useful if someone search this again.
The date parameter need to be passed wrapped within the square bracket []. Set a variable which will give your date as [YYYY/MM/DD] and evaluate that date after SQL Exec and pass with stored procedure.
See below the sample script which I pull the modelled calendar from our SQL data warehouse based on fact table's max and min date:
FS:
SQL
EXEC [INFO].[dbo].[spQV_RTT_FreeSlots];
Temp_Calendar_Range:
LOAD
Min
(num
([FS.AppointmentDate]
))as
MinDate
,
Max
(num
([FS.AppointmentDate]
)) as
MaxDate
RESIDENT
[FS];
LET
vMindateFS
='['&date
(Peek
('MinDate',0,'Temp_Calendar_Range'),'YYYY/MM/DD')&']';
LET
vMaxdateFS
='['&date
(Peek
('MaxDate',0,'Temp_Calendar_Range'),'YYYY/MM/DD')&']';
//*/
Calendar:
NOCONCATENATE
LOAD
*,
[date]
as
[FS.AppointmentDate]
;
SQL
EXEC [INFO].[dbo].[spQV_Calendar_date_Between] $(vMindateFS)
, $(vMaxdateFS)
;
DROP
TABLE
Temp_Calendar_Range;