Home » Other » Training & Certification » print calendar
print calendar [message #272021] Wed, 03 October 2007 12:16 Go to next message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Hi All,

I would like to have a Pl/Sql code wherein I can have the total year in the format of calendar i.e right from the week number,day and the date.

like

WeekNo. Day Date
------------------------
1 Sun 01-Jan-2007

till

52 Sat 31-Dec-2007.

I've searched using the string calendar , but that is in SQL.

Looking forward for your help.

Regards,

Raj
Re: print calendar [message #272024 is a reply to message #272021] Wed, 03 October 2007 12:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Did you search for "calendar" before posting?

Regards
Michel
Re: print calendar [message #272025 is a reply to message #272021] Wed, 03 October 2007 12:30 Go to previous messageGo to next message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Hi Michel,

Before posting I searched with the string "Calendar" , but I could'nt find the one same one as I'm looking in Pl/sql Using loops.

I'm able to get the days of the week but not the calendar:

declare
i number:=1;
begin
while(i<8)
loop
select to_char(next_day(sysdate,i),'day') from dual;
dbms_output.put_line(i);
i:=i+1;
end loop;
end;


So, plz help by giving me a query for calendar using pl/sql like
in the format of calendar i.e right from the week number,day and the date .

WeekNo. Day Date
------------------------
1 Sun 01-Jan-2007

till

52 Sat 31-Dec-2007.

Looking forward for your help.

Regards,
Raj
i.e.,



Re: print calendar [message #272027 is a reply to message #272021] Wed, 03 October 2007 12:35 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
For performance reasons, you should use SQL where at all possible.

Why is using SQL to solve your problem unacceptable?
Re: print calendar [message #272028 is a reply to message #272027] Wed, 03 October 2007 12:43 Go to previous messageGo to next message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Sir,

But I just want to know how do we do using the same in Pl/sql concepts.

So, I'de be glad to know how to do that in pl/sql.


Re: print calendar [message #272035 is a reply to message #272028] Wed, 03 October 2007 13:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Tell us what you already tried and why this is not correct.

Regards
Michel
Re: print calendar [message #272097 is a reply to message #272035] Thu, 04 October 2007 00:54 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Have you tried transforming the SQL query into a PL/SQL block?

MHE
Re: print calendar [message #272245 is a reply to message #272021] Thu, 04 October 2007 05:27 Go to previous messageGo to next message
muzahid
Messages: 281
Registered: September 2004
Location: Dhaka, Bangladesh
Senior Member
http://www.orafaq.com/forum/m/17847/43055
Re: print calendar [message #272256 is a reply to message #272245] Thu, 04 October 2007 05:53 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Good now we know that you can also use the Search button.

Regards
Michel
Previous Topic: What will be the Cost of OCA Certification for delow items
Next Topic: Date Problem
Goto Forum:
  


Current Time: Sat Nov 23 07:42:54 CST 2024