Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Im trying to select variables and alternate variables into parameters while executing a stored procedure in SQL via my qlikview script. What is the proper syntax for stating an alternate variable?
this is the original statment
Measure_Temp:
SQL EXEC mtzcus_ActiveMedList_60 '$(vFactoP)', '$(vFromDt)', '$(vToDt)','N';
I would like to replace 'vFromDt' with 'vFromDt2' when' vFactoP'='MOH'
I tried this, but it didnt work:
Measure_Temp:
SQL EXEC mtzcus_ActiveMedList_60 '$(vFactoP)', If((vFactoP='MOH')'$(vFromDt2)')'$(vFromDt)', '$(vToDt)','N';
Any help is appreciated..
thanks
Beth
Perhaps something like this:
LET vFromDt = If('$(vFactoP)'='MOH', '$(vFromDt2)', '$(vFromDt)' ;
Measure_Temp:
SQL EXEC mtzcus_ActiveMedList_60 '$(vFactoP)','$(vFromDt)' ,'$(vToDt)','N';
If I use $(vFactoP) in the statement:
LET vFromDt = If('$(vFactoP)'='MOH', '$(vFromDt2)', '$(vFromDt)'
The script interprets as (each variable in vFactoP = 'MOH')
If I use vFactoP without the dollar sign, it makes all vFactoP values use vFromDt2.
I cant seem to get the script to understand to apply vFromDt2 only when vFactoP = 'MOH'