"if" condition in SELECT ?
Hello!
I wonder is it possible to write an SQL query to do the following:
There is a table table1 with two fields field1 and field2. Field2 always has some data, field1 - sometimes. I need to select field1, if it's not empty, otherwize - field2.
select (if field1 == NULL then field2 else field1) from table1;
Is this possible in SQL?
I woulld appreciate you help.
Thank you,
-Rita
Subject
Views
Written By
Posted
"if" condition in SELECT ?
27071
September 07, 2007 08:38AM
16654
September 07, 2007 08:51AM
11137
September 07, 2007 10:09AM
6088
May 15, 2008 10:05AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.