February 26th, 2015, 10:23 AM
Join Date: Nov 2013
Time spent in forums: 2 h 5 m 10 sec
Reputation Power: 0
How to eliminate one header column from select statement
I have statement:
from table A
I want to see the result headers:
but no col4 and col 5 even though they are in select statement.
I try to do:
case when exists (slect 1 from table B) then col4 end
case when exists (slect 1 from table B) then col5 end
But in this case I get result :
col1 col2 col3 col4 col5
1 1 1
2 2 2
col4 and col5 exists, but with value NULL.
Please help me withis query.