Skip to Content
0
Former Member
Mar 16, 2007 at 11:35 AM

Query Regarding Native SQL

222 Views

Hello Friends,

I am having a requirement to fetch the records from 3 tables( Using inner join)

into an internal table but I am facing a difficulty that I need to fetch the records from this table with entirely different conditions and I need to use ' UNION ALL' Command to fetch the records from the database. For Eg.

I have to write two select statement....

Select <f1> <f2> <f3> <f4>

from <t1> join <t2> join <t3>

into table ITAB

where <Cond. 1>

Select <f1> <f2> <f3> <f4>

from <t1> join <t2> join <t3>

appending table ITAB

where <Cond. 2>

But this is taking two much time... So the user told me to use native SQL to combine this two statement with UNION ALL.. I am using database DB2 Can anyone help me regarding this.

Thanks,

Navneet