how to make tabular calander [message #389316] |
Sat, 28 February 2009 06:30  |
hisham99
Messages: 106 Registered: October 2008 Location: united arab emirates
|
Senior Member |
|
|
i need to create a tabular calander like this attachement
can any one help me how to make it
i need an example not an idea
form consist of header and details
when user comes to details
it will populate a calander starting from the same month of the currant date
ex. if the forms is entered on nov/2008
the details will show
month year
11 2008
12 2008
1 2009
2 2009
3 2009
4 2009
5 2009
6 2009
.
.
if any one have another idea please tell me
|
|
|
|
Re: how to make tabular calander [message #389330 is a reply to message #389317] |
Sat, 28 February 2009 12:04   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It seems that it doesn't matter what month you are dealing with in the detail block, as all of them have 31 days. Therefore, a table which is used as a source for the detail data block might look likeCREATE TABLE calendar
(month_year date,
day_1 varchar2(1),
day_2 varchar2(1),
day_3 varchar2(1),
...
day_31 varchar2(1)
);
Once you enter starting month and year, you'll want to fill in next months/years. How far in the future would that go? The easiest way is probably using Oracle ADD_MONTHS function as it would do the job for you. Here's an example of how to create next six months (from September 2008):
SQL> select to_char(add_months(to_date('&starting_month', 'mm.yyyy'), level), 'mm.yyyy') result
2 from dual
3 connect by level <= 6;
Enter value for starting_month: 09.2008
RESULT
-------
10.2008
11.2008
12.2008
01.2009
02.2009
03.2009
6 rows selected.
SQL>
Quote: | i need an example not an idea
| What "example" are you talking about, exactly? What kind of "ideas" do you not want to hear?
|
|
|
|
|
|
|