Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Order by -- complex sorting?

606275Nov 6 2009 — edited Nov 10 2009
Hello:
How can one accomplish the following:
Let's say I have the following scenario:
Select value2 from table2 IF this value exists. Else, select value 1 from table1. --
Then: I would like to ORDER BY all of the above results (sometimes the value may be value1, other times vaule2, etc). How can one do such an ORDER BY? Is this even possible via a query?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2009
Added on Nov 6 2009
13 comments
1,025 views