Pak Yoel, terima kasih atas masukannya. Salam,
Indra Armansyah [EMAIL PROTECTED] ----- Original Message ----- From: "Yoel" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, July 31, 2006 11:46 AM Subject: Re: [indo-oracle] query tgl > Pak Indra, > top solusinya :) > > Kalau boleh saya nambahin, > IMHO, lebih baik pilih dummy table yang recordnya sedikit (at least 31 > record). > Supaya lebih cepat querynya. > > Where clausenya mungkin bisa seperti ini : > where to_char(((last_day(last_day(to_date('FEB2006','MONYYYY')) - 32) +1) > + > rownum -1),'MONYYYY')='FEB2006' > > > > On 7/31/06, Indra Armansyah <[EMAIL PROTECTED]> wrote: >> >> SELECT (LAST_DAY(LAST_DAY(TO_DATE('JAN2006','MONYYYY')) - 32) + >> 1)+rownum-1 >> FROM ALL_OBJECTS >> WHERE ((LAST_DAY(LAST_DAY(TO_DATE('JAN2006','MONYYYY')) - 32) + >> 1)+rownum-1) >> BETWEEN >> (LAST_DAY(LAST_DAY(TO_DATE('JAN2006','MONYYYY')) - 32) + 1) AND >> LAST_DAY(TO_DATE('JAN2006','MONYYYY')); >> >> (LAST_DAY >> --------- >> >> 01-JAN-06 >> 02-JAN-06 >> 03-JAN-06 >> 04-JAN-06 >> 05-JAN-06 >> 06-JAN-06 >> 07-JAN-06 >> 08-JAN-06 >> 09-JAN-06 >> 10-JAN-06 >> 11-JAN-06 >> 12-JAN-06 >> 13-JAN-06 >> 14-JAN-06 >> 15-JAN-06 >> 16-JAN-06 >> 17-JAN-06 >> 18-JAN-06 >> 19-JAN-06 >> 20-JAN-06 >> 21-JAN-06 >> 22-JAN-06 >> 23-JAN-06 >> 24-JAN-06 >> 25-JAN-06 >> 26-JAN-06 >> 27-JAN-06 >> 28-JAN-06 >> 29-JAN-06 >> 30-JAN-06 >> 31-JAN-06 >> >> Kalau mau menampilkan bulan lain, tinggal ganti JAN2006 dengan bulan yang >> diinginkan misalnya FEB2006 >> >> SELECT (LAST_DAY(LAST_DAY(TO_DATE('FEB2006','MONYYYY')) - 32) + >> 1)+rownum-1 >> FROM ALL_OBJECTS >> WHERE ((LAST_DAY(LAST_DAY(TO_DATE('FEB2006','MONYYYY')) - 32) + >> 1)+rownum-1) >> BETWEEN >> (LAST_DAY(LAST_DAY(TO_DATE('FEB2006','MONYYYY')) - 32) + 1) AND >> LAST_DAY(TO_DATE('FEB2006','MONYYYY')); >> >> (LAST_DAY >> --------- >> 01-FEB-06 >> 02-FEB-06 >> 03-FEB-06 >> 04-FEB-06 >> 05-FEB-06 >> 06-FEB-06 >> 07-FEB-06 >> 08-FEB-06 >> 09-FEB-06 >> 10-FEB-06 >> 11-FEB-06 >> 12-FEB-06 >> 13-FEB-06 >> 14-FEB-06 >> 15-FEB-06 >> 16-FEB-06 >> 17-FEB-06 >> 18-FEB-06 >> 19-FEB-06 >> 20-FEB-06 >> 21-FEB-06 >> 22-FEB-06 >> 23-FEB-06 >> 24-FEB-06 >> 25-FEB-06 >> 26-FEB-06 >> 27-FEB-06 >> 28-FEB-06 >> >> Salam, >> >> Indra Armansyah >> [EMAIL PROTECTED] <indra%40hastinapura.com> >> >> >> ----- Original Message ----- >> From: "agus sulaiman" <[EMAIL PROTECTED] <agus_ska%40yahoo.com>> >> To: <[email protected] <indo-oracle%40yahoogroups.com>> >> Sent: Monday, July 31, 2006 10:17 AM >> Subject: [indo-oracle] query tgl >> >> > Kepada Teman-teman semuanya, >> > >> > >> > Bagaimana cara kita untuk menampilkan seluruh tgl yg ada pada bulan >> > januari pada SQL? mungkin teman-teman pernah mencobanya. >> > >> > Jadi hasil yg diinginkan sebagai berikut: >> > 01-JAN-06 >> > 02-JAN-06 >> > . >> > . >> > . >> > 31-JAN-06 >> > >> > >> > >> > >> > Terima kasih. >> > >> > __________________________________________________ >> > Do You Yahoo!? >> > Tired of spam? Yahoo! Mail has the best spam protection around >> > http://mail.yahoo.com >> > >> > [Non-text portions of this message have been removed] >> > >> > >> > >> > -- >> > -----------I.N.D.O - O.R.A.C.L.E--------------- >> > Keluar: >> > [EMAIL PROTECTED]<indo-oracle-unsubscribe%40yahoogroups.com> >> > 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 >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > -- >> > No virus found in this incoming message. >> > Checked by AVG Free Edition. >> > Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: >> 7/28/2006 >> > >> > >> >> >> > > > [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 > > > > > > > > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 7/28/2006 > > -- -----------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/

