Klo di MSSQL 2000,coba query ini : select min(kode) as kode,rincian, sum(case [user] when 'BY' then jam else 0 end) as [BY], sum(case [user] when 'DC' then jam else 0 end) as [DC], sum(case [user] when 'NP' then jam else 0 end) as [NP] from indoprog1 group by rincian order by rincian
--- In [email protected], De ce <[EMAIL PROTECTED]> wrote: > > Mohon bantuan dari rekan-rekan sekalian, saya memiliki record sbb: > > User Kode Rincian Jam Tgl > BY 0100025 Administration 8 01/05/2006 > BY 0100025 Administration 4 02/05/2006 > BY 0100026 Mentoring 3 03/05/2006 > BY 0120025 Administration 4 01/06/2006 > DC 0100025 Administration 6 05/05/2006 > DC 0100025 Administration 3 07/05/2006 > DC 0100026 Mentoring 2 05/06/2006 > DC 0100025 Administration 4 10/06/2006 > NP 0100030 Marketing 8 01/05/2006 > NP 0100025 Administration 2 02/06/2006 > NP 0100030 Marketing 7 03/06/2006 > > bagaimana query untuk bisa keluar layout seperti: > > Kode Rincian BY DC NP > 0100025 Administration 16 13 2 > 0100026 Mentoring 3 2 0 > 0100030 Marketing 0 0 15 > > Terima kasih. > de == ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/zCsqlB/TM --------------------------------------------------------------------~-> Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED] Forum ini berkembang dengan pesat, jika anda memiliki dedikasi dan waktu, silahkan mengaplikasikan diri menjadi moderator. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/indoprog-vb/ <*> 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/
