wah maaf mas, saya baru bisa online setelah dirunning hasilnya rancu dan jauh dari yang diharapkan. sebenarnya saya dah bangun satu queri tapi yang berbeda cuma urutan prod_id 18 dan prod_id 15 dimana pada validasi 18 muncul setelah 15 padahal pada tabel sales2 18 muncul lebih dulu. Query yang saya bangun untuk validasi :
insert into validasi(sales_id,prod_id) select s.sales_id, s.prod_id from validator v, sales2 s where s.prod_id=v.prod_id order by s.sales_id, v.jumlah_muncul desc; O ya untuk merefresh diskusi kita hasil yang saya harapkan adalah pada tabel validasi urutan mengikuti tabel sales tapi hanya produk yang ada pada tabel validator. Sebelumnya makasi ya mas atas jawaban-jawaban saya selama ini. Thanks Best Regards D'Sudi On 8/11/06, Ferry Setiawan <[EMAIL PROTECTED]> wrote: > > coba ini mas, > > > insert into validasi(sales_id,prod_id) > select s.sales_id, s.prod_id > from validator v,sales2 s > where s.prod_id=v.prod_id > order by s.sales_id asc,v.jumlah_muncul desc,v.prod_id desc > > maaf saya posting aja, soalnya chat anda idle...sebelum insert coba dulu > querynya (selectnya saja tanpa insert).. > > Regards > > Ferry S > > > > -----Original Message----- > > From: [email protected] <indo-oracle%40yahoogroups.com>[mailto: > [email protected] <indo-oracle%40yahoogroups.com>]On > > Behalf Of Yoel > > Sent: 11 August 2006 09:28 > > To: [email protected] <indo-oracle%40yahoogroups.com> > > Subject: Re: [indo-oracle] Tanya kueri > > > > > > kalo ingin urutannya sesuai urutan data di table SALES. > > > > select sales_id, prod_id > > from sales > > where prod_id in (select prod_id from validator) > > > > tanpa order by semestinya urutannya ikut dengan urutan data table sales. > > tapi hanya tampilan prod_id yang ada di table validator. > > coba dulu,sorry terus terang belum test sqlnya karena gak punya > > data-nya :) > > semoga berhasil. > > > > On 8/11/06, gede sudi <[EMAIL PROTECTED] <gede.sudi%40gmail.com>> > wrote: > > > > > > maksudnya urutan di tabel validasi mengikuti urutan data di > > sales dengan > > > ketentuan product yang muncul hanya yang memenuhi >=3 sesuai di tabel > > > validator. > > > [Non-text portions of this message have been removed] -- -----------I.N.D.O - O.R.A.C.L.E--------------- Keluar: [EMAIL PROTECTED] Website: http://indo-oracle.blogspot.com Mirror: http://indooracle.wordpress.com ----------------------------------------------- Bergabung dengan Indonesia Thin Client User Groups, Terminal Server, Citrix, New Moon Caneveral, di: http://indo-thin.blogspot.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/indo-oracle/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

