Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Conditionally use different table to query against
Hi anyone/everyone
I have a problem, which I know could be easily done using PL/SQL with 2 separate queries, and at run time using IF..THEN to determine which of the 2 to use.
However this is not an option and I need to try do this in 1 SQL query, for various reasons- There must be a solution (no matter how odd/work around it is).
I have 2 tables TRANSACTION_DATA and TRANSACTION_DATA_HISTORY.
My query needs to query TRANSACTION_DATA if inputted numbers of days is < 50 ,otherwise use TRANSACTION_DATA_HISTORY.
Any help would be greatly appreciated.
This is pretty URGENT- if anyone can be a Knight In Shining Armour, now is your time !!!!!! Received on Wed Feb 14 2007 - 04:08:51 CST