| Author |
Merging two query results into one in Oracle
|
Pawan Choure
Greenhorn
Joined: May 11, 2008
Posts: 27
|
|
I have to get two different result on the same table.First Result will be get first then added by Second result
Custid Name Nextactiondt priorityscr lastacssts
65 A 16-JUN-11 11.52 14-MAR-11
84 B 16-JUN-11 1.38 14-MAR-11
93 C 17-JUN-11 0 18-APR-11
Custid Name Nextactiondt priorityscr lastacssts
59 S 16-JUN-11 1212 16-JUN-11
I want to club the result of the two query into 1 as follows.
Custid Name Nextactiondt priorityscr lastacssts
65 A 16-JUN-11 11.52 14-MAR-11
84 B 16-JUN-11 1.38 14-MAR-11
93 C 17-JUN-11 0 18-APR-11
59 S 16-JUN-11 1212 16-JUN-11
but when i am using UNION
I am getting
Custid Name Nextactiondt priorityscr lastacssts
59 S 16-JUN-11 1212 16-JUN-11
65 A 16-JUN-11 11.52 14-MAR-11
84 B 16-JUN-11 1.38 14-MAR-11
93 C 17-JUN-11 0 18-APR-11
but that is different from what i expect
Custid Name Nextactiondt priorityscr lastacssts
65 A 16-JUN-11 11.52 14-MAR-11
84 B 16-JUN-11 1.38 14-MAR-11
93 C 17-JUN-11 0 18-APR-11
59 S 16-JUN-11 1212 16-JUN-11
so any one know how can i append the results of two queries into one since i have order by clause in both queries and i can club them together.
Any help regarding this would be appreciated
|
Pawan Choure
|
 |
Fatih Keles
Ranch Hand
Joined: Sep 01, 2005
Posts: 182
|
|
I can not see your objective but this may help
|
 |
 |
|
|
subject: Merging two query results into one in Oracle
|
|
|