Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Insert Records into a table

Re: Insert Records into a table

From: <fitzjarrell_at_cox.net>
Date: 7 Sep 2006 09:49:03 -0700
Message-ID: <1157647743.465901.6420@e3g2000cwe.googlegroups.com>


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:

http://groups.google.com/group/comp.databases.oracle.server/browse_thread/thread/ab8b78b80f6371cf/61217f3306654aa5?lnk=gst&q=generate+past+dates&rnum=1#61217f3306654aa5

> Thanks

David Fitzjarrell Received on Thu Sep 07 2006 - 11:49:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US