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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -