Hi,
I'm wondering if there is any way to add a variable to a string parameter so that the parameter field can be changed without having to manually change the data. This seems like it should be easy enough but I've tried and had no luck.
Basically here's my situation: I have three parameters that are being used to in order to filter the data from an SQL database.
They look something like this:
PeriodAFilter = (VI_PS_TKT_HIST.POST_DAT >= '2010-11-01') and (VI_PS_TKT_HIST.POST_DAT <= '2011-03-10')
PeriodBFilter = (VI_PS_TKT_HIST.POST_DAT >= '2010-11-01') and (VI_PS_TKT_HIST.POST_DAT <= '2011-03-10') and((((VI_PS_TKT_HIST_LIN.ITEM_NO = 'WEBSALE_ITEM')))
PeriodCFilter = (VI_PS_TKT_HIST.POST_DAT >= '2010-11-01') and (VI_PS_TKT_HIST.POST_DAT <= '2011-03-10') and((((VI_PS_TKT_HIST_LIN.ITEM_NO = 'DELIVERY_ITEM'))) or (((VI_PS_TKT_HIST_LIN.ITEM_NO = 'SHIPPING_ITEM'))))
So obviously there is some redundancy here. Every time I want to change the date range for the items I want returned I have to change all three parameter fields. (These are static string parameters, btw)
What I really want is to have look like:
PeriodAFilter = (VI_PS_TKT_HIST.POST_DAT >= MyStateDateVariable) and (VI_PS_TKT_HIST.POST_DAT <= MyEndDateVariable)
That way I could just change a single easy variable to get the date to what I want. Seems simple enough.
Well I've tried this a bunch of ways. I tried defining a parameter to use as the variable and that didn't seem to work. I tried using a formula and that didn't seem to work. Unless, of course, I'm somehow doing the syntext wrong or just missing something entirely
Any ideas?