I am trying to write a SQL query in Crystal Reports accessing an Oracle database, and I need to use a function that will identify and filter on a value in one field based on a parameter value which is based on a different field. The decode function works except when I need two results for the second field based on one {?parm}.
{?parm} Field2
7 233
8 134,135
9 436
Is it possible to use decode with two results, and if so, how would I go about it? I've tried, e.g.,
"table"."field2" =
decode({?parm},7,233,8,(134,135),9,436)
If this isn't possible, is there another function I could use? I haven't been able to get a "case when" to work either.
-LB
{?parm} Field2
7 233
8 134,135
9 436
Is it possible to use decode with two results, and if so, how would I go about it? I've tried, e.g.,
"table"."field2" =
decode({?parm},7,233,8,(134,135),9,436)
If this isn't possible, is there another function I could use? I haven't been able to get a "case when" to work either.
-LB