Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need HELP.

Status
Not open for further replies.

maitrasuman

Programmer
Aug 2, 2001
6
0
0
IN
I have the parent query with a column name 'RCPTMODE'. Based on the value derived from that I have to make child query from different tables with same data structures. How to do that ?

Example : if RCPTMODE value is "CASH" then I have to query from table A and if RCPTMODE value is "CHEQUE" then I have to query from table B.
 
Code:
              |------------------------|
              | SELECT RCPTMODE, ...   |
              | FROM PARENT_TABLE      |
              |------------------------|

|------------------------|  |--------------------------|
| SELECT ...             |  | SELECT ...               |
| FROM TABLEA            |  | FROM TABLEB              |
| WHERE :RCPTMODE='CASH' |  | WHERE :RCPTMODE='CHEQUE' |
|------------------------|  |--------------------------|

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: Emu Products Plus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top