Despite having spent an hour researching I can\'t seem to figure out how to correctly define a variable and then use it in your SQL.
This is what I have so far produ
This is an old post, but in case anyone stumbles on this (as I just did), you can handle this with a CTE:
with params as (
select date '2011-11-03' as startdate
from dual
)
select . . .
from params cross join
. . .
Almost the same syntax works in SQL Server (minus the date
-specific stuff and from dual
).