sql - Select Statement based on user defined variable -
i trying simple select statement based on input of user (ssrs). help!
select * table1 case when @x = 'yes' (select * table1 [column1] < 0) end; case when @x = 'no' (select * table1 [column1] > 0) end;
thank in advance
kj
it should simple as
select * table1 (@x = 'yes' , [column1] < 0) or (@x = 'no' , [column1] > 0);
by way, select *
bad coding, should specify each column returning.
Comments
Post a Comment