Parameter for a Database COMMAND?
Posted on 2006-06-30
I'm using this SQL Command at the Database Command line level and I would like to have the ability in CR XI to input/change the DATE within the Crystal Report...instead of having to go to the Command Line here and change it. I "think" I need to use a parameter but not sure how.
How can I have the DATE of 06-30-2006 00:00:00 changed to where I use the SELECT CRITERIA in Crystal to change the date for the report run...THANKS
declare @HistDate datetime
set @HistDate = '06-30-2006 00:00:00' --<<<--- Type in the Historical Unit DATE that you wish to use HERE
select ( dbo.gethistoricalunit(dbo.bkcyacct.[file number],@HistDate)) as [HistUnit],*
where [system closed date] is null
or [system closed date] > @HistDate
and [file open date] <= @HistDate
WHERE A.[HistUnit] is not null
--and [file number] not like 'Z%'
and [file number] not like '99%'
and [file number] not like '1001%'