mohebkasem
IS-IT--Management
Hi All,
I am building a report with a sql server command script. I am trying to set up a report the user has the flexibility to run it with two options. The report keeps giving me a syntax error.
Ultimately what I'd like to write is something in this effect.
SELECT
Field_1
Field_2
FROM Table_A
WHERE
CASE WHEN {?Parmater1 = 'All' THEN
Field_4 in (Select id form Table_B)
ELSE Field Field_5 = {?Parmater2}
END
Your help is much appreciated.
Thank you
I am building a report with a sql server command script. I am trying to set up a report the user has the flexibility to run it with two options. The report keeps giving me a syntax error.
Ultimately what I'd like to write is something in this effect.
SELECT
Field_1
Field_2
FROM Table_A
WHERE
CASE WHEN {?Parmater1 = 'All' THEN
Field_4 in (Select id form Table_B)
ELSE Field Field_5 = {?Parmater2}
END
Your help is much appreciated.
Thank you