-
I am trying to create a query that will return two specific records first and then follow them by the rest of the records that match the query. For example:
select acno from rcb_acct
where acno in ('555555666666666','333333333333333')
and lgon_pref = 'MYN'
order by acno
union
select acno from rcb_acct
where lgon_pref = 'MYN'
order by acno
/
I want the first two records that match my first select statement and then the rest that match the second selec statement. The problem I am having with the above query is that it doesn't like the order by clause. I need the results of each query sorted seperately. Is there a way I could run two queries and concatenate the results together?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|