Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Conditionally use different table to query against

Conditionally use different table to query against

From: mwmann <mwmann_at_gmail.com>
Date: 14 Feb 2007 02:08:51 -0800
Message-ID: <1171447731.517691.245500@q2g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US