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

Home -> Community -> Usenet -> c.d.o.misc -> Re: "create sequence" statement and 'starting with' clause issue

Re: "create sequence" statement and 'starting with' clause issue

From: Ed Prochak <edprochak_at_gmail.com>
Date: 20 Nov 2006 12:47:42 -0800
Message-ID: <1164055662.329196.40940@h54g2000cwb.googlegroups.com>

termoPilucco wrote:
> sybrandb ha scritto:
>
> > CREATE SEQUENCE is DDL (Data Definition Language).
> > DDL is not possible in PL/SQL except via EXECUTE IMMEDIATE <command
> > string>.
>
> Ah thanks, now it works fine!
>
>
> > it is EXTREEMLY BAD practice to create a database on the fly.
>
> I understand, but i have no choice about it
>
> termoPilucco

Are you sure you really need to CREATE a sequence for every file?? I cannot think of a business reason for this. The closest I can imagine is that the data from the file is being stored and the filename contains part of the data. (e.g. phone data from the 792 exchange code are in file pn792.dat where each of the ten thousand lines is one number. so line one is phone number 792-0000, line two is 792-0001, etc and internally the number is stored as a 7digin integer, 7920000, 7920001, ...)

Even there, the sequence is only needed in the load and no database sequence need be created. (just setting the start number for the sqlLoader SEQUENCE option).

So what drives you to this lack of choice? Received on Mon Nov 20 2006 - 14:47:42 CST

Original text of this message

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