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: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 21 Nov 2006 08:10:53 -0800
Message-ID: <1164125453.210639@bubbleator.drizzle.com>


termoPilucco wrote:
> Jim Smith ha scritto:
>

>> I don't think he is creating a sequence for every file. What he said was
>>
>>  >I want to create a sequence using a SQL text file and launcihng with
>> sqlplus.

>
>
> Yes.
> It's all about a single sequence that is referred by a table (through a
> trigger).
> The table is stored alone in a dmp file (where no sequence is
> memorized) and i need to import the table (and make it works properly)
> with a single click.
>
> termoPilucco

You still seem to be under the impression that there is a relationship between a table and a sequence. No such relationship exists: They are totally independent objects.

If I understand what you are trying to do, and I'm not sure, you need to import the table and then:

  1. SELECT MAX(some_value) FROM <table>
  2. CREATE SEQUENCE where the starting value is the MAX+1 -- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org
Received on Tue Nov 21 2006 - 10:10:53 CST

Original text of this message

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