Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Insert Records into a table
Comments embedded.
B. Williams wrote:
> I have created a table with two columns and one of the columns is the month
> and the other is the date.
Why?
> I want to use a pl/sql program to insert the
> months and dates into the table using a loop instead of using a bunch of
> insert statements.
Again I ask why? What purpose does this serve?
>Will someone assist me with this? If I can get some help
> with January, I can figure the rest of the months out.
>
Oh, I'm fairly certain someone will try, but I can't understand why these columns are created, or why you feel the need to store date values as strings. To get you started I'd be looking up information on the to_char() function as it will allow you to isolate date parts as strings. If your issue is generating dates from January 1 on then I would investigate analytic functions such as CUBE. Or read this thread for some ideas:
> Thanks
David Fitzjarrell Received on Thu Sep 07 2006 - 11:49:03 CDT
![]() |
![]() |