Sebelumnya terimakasih atas semua yg telah merespon email ini.
   
  setelah di test, hasilnya sama spt data aslinya ...
   
  sorry, bukannya "Union"/ "Union All" itu untuk menggabungkan 2 queries ?!
   
  tks/Aly
  

[EMAIL PROTECTED] wrote:
          coba saya bantu,

select * from(
select User_id User_name Seq Status from tabel
where status='Approve'
union all
select User_id User_name Seq Status from tabel
where (status is null and seq=1)
) order by User_id

salam,

adhi

aly rmb <[EMAIL PROTECTED]> 
Sent by: [email protected]
23/10/2007 15:13
Please respond to
[email protected]

To
[email protected]
cc

Subject
[indo-oracle] Query table

Hi .....
ada data spt di bawah :

User_id User_name Seq Status
---------------------------------------------------------
1 A 1
1 B 2 Approve
2 C 1
2 D 2
3 E 1
3 F 2 Approve
3 G 3

yg ingin di hasilkan 
1 B 2 Approve
2 C 1
3 F 2 Approve

Klo Statusnya ngga' ada yg Approve, maka Seq = 1 yg akan di tampilkan

Tolong pencerahannya donk ....

Send instant messages to your online friends http://uk.messenger.yahoo.com 

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]



                         

 Send instant messages to your online friends http://uk.messenger.yahoo.com 

[Non-text portions of this message have been removed]

Kirim email ke