Returned two values from a case statement?
I'm trying to write a select statement that looks something like this:
select * from table where tablefield in (0, 8)
The "0, 8" needs to be generated within the SQL by reference to another field in the table. I had hoped something like this would work:
select * from table where tablefield in (case otherfield when 1 then (0, 8) else 3)
... but -- of course -- it fails.
Does anyone have any suggestions on how to derive this value?
Thanks for any help.
-- Brent
Subject
Written By
Posted
Returned two values from a case statement?
December 22, 2005 07:37PM
December 23, 2005 11:59AM
December 23, 2005 02:38PM
December 23, 2005 08:15PM
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.