Hi Experts,
I have a dynamic sql stmt that I'm trying to use in the DataSet. One of the variables is the param that I have to pass at a runtime from JSP. In the sql stmt it looks like this:
if (
@DateRange='Last 7 Days')
begin
set
@dbfromdate=dateadd(day,-7,
@currdate)
set
@dbthroughdate=@currdate
end
else if (
@DateRange='Last 30 Days')
begin
set
@dbfromdate= dateadd(day,-30,
@currdate)
set
@dbthroughdate=@currdate
end
@DateRange is my param that I have to pass to BIRT at runtime, how do I change this so it would except date range as a param and I would not have to declare it in sql. There are bunch of IF smts like that in the query I have. I created a Report Parameter, I also created parameter in the data set and linked it to the Report Parameter, but I don't know what to change
@DateRange to so it would still work in the sql.
Thank you ahead of time for your help.