|
-
use DECODE
you can try this
select acno from rcb_acct
where lgon_pref = 'MYN'
order by
decode(acno ,
'555555666666666','1'
'333333333333333','2',acno) ;
assuming acno is always greater than '1','2' so that default value from decode is the acno and will be ordered after '1' and '2'.
OR
if you want to sort by two groups of union, try this
select acno,1 ordering from rcb_acct
where acno in ('555555666666666','333333333333333')
and lgon_pref = 'MYN'
union
select acno,2 ordering from rcb_acct
where lgon_pref = 'MYN'
order by ordering, acno
hptse
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
|