954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Alternate for union two tables (urgent)..

hi friends..
I need an alternate query without using UNION for below query..

select DIST_NO from acquired_tbl WHERE  FOLIO_NO='l01917' And STAT_FLAG <> 'Matched' 
union select  DIST_NO from transfrd_tbl WHERE FOLIO_NO='l01917' And STAT_FLAG <> 'Matched'
kartisathis
Newbie Poster
22 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

Without a UNION the results will be different. You could try a JOIN on FOLIO_NO.

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

ya i tried that too but the performance kills when compared to UNION

kartisathis
Newbie Poster
22 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

So what is it you're after then ?

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You