sql - TSQL where case -



sql - TSQL where case -

i need right tsql syntax problem :

select * table var_a='10' select * table var_b='10'

when utilize var_a or var_b depends on value of var_c

so when var_c='something' utilize var_a='10' else var_b='10'

select * [table] case when var_c = 'something' var_a else var_b end = '10'

sql fiddle demo.

sql sql-server tsql

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -