-
Column Selection in a Select Query
I want to bring back different column from a table dependant upon the data in that column. (ie if Column A is empty, then bring the data from Column B )
I will try to explain in a simple example.
tblTest : (tbltest Has only two Columns which contain string Data)
ColA
ColB
What I need:-
I want to do a simple select statement which brings back ColA data where it is not null, else if it is null, bring back colB data.
I can perform it using Union, of two data sets. Is there a better way.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|