I read that we cannot reference a field from a form to enter a parameter within a pass-through query that references a stored procedure.
However, could one of those parameters be a dynamic date?
For example, below is what I have
{call dbo.RPT_storedproc1 (
'code1;code2',
NULL,
NULL,
'1234;9999;8888',
'2022-12-31',
'2023-01-23',
1,
1,
1,
NULL,
NULL,
'A',
'DATE',
'SYSTEM')}
this logic works fine, but I'd like to have the dates be dynamic rather than hardcoded.
I've tried replacing '2022-12-31' with, dateadd(month,-1,convert(date,getdate())), but then I get the error, "Invalid character value for cast specification". I get the same error even when I use just getdate().
any help would be greatly appreciated.
thanks!
However, could one of those parameters be a dynamic date?
For example, below is what I have
{call dbo.RPT_storedproc1 (
'code1;code2',
NULL,
NULL,
'1234;9999;8888',
'2022-12-31',
'2023-01-23',
1,
1,
1,
NULL,
NULL,
'A',
'DATE',
'SYSTEM')}
this logic works fine, but I'd like to have the dates be dynamic rather than hardcoded.
I've tried replacing '2022-12-31' with, dateadd(month,-1,convert(date,getdate())), but then I get the error, "Invalid character value for cast specification". I get the same error even when I use just getdate().
any help would be greatly appreciated.
thanks!