Transparently implementing an autoincrement trigger?

I'm developing an application using object-relational mapping framework (Toplink Essentials).
The schema design is restricted by certain policy rules, one of which is that every table should have a single primary key column. This also applies to join tables.
I'm having problems figuring out how to make the mapping framework work with this sort of database schema so I thought I'd try to create a PL/SQL trigger which would assign ID's without the mapping framework knowing anything about it.
Now, I've ran into a small problem implementing the trigger: When I leave out the primary key value from INSERT statements I get the following error:
”ORA-00947: not enough values”
Is it possible to create a trigger which would assign the primary key so that the primary key value could be missing entirely from the INSERT statements?
Given the following table definition:
CREATE TABLE myjointable (
primary_key VARCHAR2(18) NOT NULL PRIMARY KEY,
foo_fkey VARCHAR2(18) NOT NULL,
bar_fkey VARCHAR2(18) NOT NULL,
CONSTRAINT uk1 UNIQUE (foo_fkey, bar_fkey)
can I add rows like this:
INSERT INTO myjointable VALUES ('a', 'b');
I've tried it with the following trigger procedure but then I get the "missing values" error:
CREATE OR REPLACE TRIGGER t1
BEFORE INSERT ON myjointable
FOR EACH ROW
BEGIN
IF INSERTING THEN
IF :new.primary_key IS NULL THEN
-- primary_key values are fetched from the szkeygenerate PL/SQL function
SELECT szkeygenerate INTO :new.primary_key FROM dual;
END IF;
END IF;
END;
/

You could hide the table using a view:
SQL> create table t
  2  (x int primary key
  3  ,n varchar2(25)
  4  ,v varchar2(25)
  5  );
Table created.
SQL> create sequence seq
  2  /
Sequence created.
SQL>
SQL> create trigger trg
  2  before insert on t
  3  for each row
  4  begin
  5     if :new.x is null
  6     then
  7        select seq.nextval
  8          into :new.x
  9          from dual;
10     end if;
11  end;
12  /
Trigger created.
SQL> create view v
  2  as
  3  select n, v
  4    from t
  5  /
View created.
SQL> insert into v
  2  values ('test', 'one two');
1 row created.
SQL>
SQL> select *
  2    from t
  3  /
         X N                         V
         1 test                      one two
SQL> 

Similar Messages

  • How do I implement a stop trigger for my 6602 counters?

    I currently have the start of data acquistion for two channels syncrhonized with a start trigger. I am doing simple event counting using two seperate counters.
    For my start trigger, I use a third counter to generate a single pulse and put the output on the trigger line that the two counters are watching.
    Works great! But, I also want to synchronize the stopping of data acquisition for the two channels. I thought this would be simple as configuring a ND_STOP_TRIGGER like I did a ND_START_TRIGGER. But, this is giving me errors.
    Does the 6602 not support stop triggering? Am I just out of luck?

    Hi there,
    this thread is quite old but I'm facing the same problems.
    I'm using a PXI-6602 and a PXI-6521 in a PXI-1033 chassis. On the 6521 I create a continuous sample pulse as a counter output. This I route to the PXI_Trig0.
    On the 6602 I have two counters set up to continuous edge counting with the external clock configured to PXI_Trig0.
    I start counting by setting a internal trigger channel to high which is routed to PXI_Trig1, and this is configured as the start trigger signal for both counters on the 6602 so that they count simultaneously based on their common sample clock.
    This works quite good...but I have some problems to stop the counting.
    I have to stop counting as soon as I have reached 1024 increments (one revolution of a wheel, signal duty cycle 50 %) on one counter and then I have to check if the other counter have reached at least 48 (duty cycle 50%) or 96 pulses (duty cycle 20% or 80%, depending on the revolution direction).
    So far I read the counter value of ctr1 in a loop and if the value is equal to or greater 1024 I stop. Sometimes I miss the value 1024 (how can this happen as I count buffered + continuously?) I make a retry. But I get the impression that even I configured both counters with the same start trigger and sample clock, the counting isn't synchronous. When I try it with two function generators, I works quite good but not perfect. If I connect real life signals, in the lower frequency range (up to 500 1/min of the wheel), I almost always have fewer pulses then necessary, e.g. 88-94 pulses instead of 96. In the upper frequency range (up to 3000 1/min of the wheel), I have way too much pulses, e.g. 122-125 pulses instead of 96.
    I use the digital filters of the counter board for both TTL signals.
    Does anybody have an idea what I can do on this subject?
    Thanks in advance for any help
    Regards
    Achim

  • Can I implement the functionality of a Schmitt trigger in LabVIEW?

    I am reading in a waveform file using the Read Waveform From File.vi.  I would like some guidance as to how to implement a Schmitt trigger using LabVIEW blocks to massage the incoming waveform into a new waveform that resembles a digital data stream.
    For example:
    When the amplitude of the incoming waveform goes over 0.7, the output is 1 and is latched until the amplitude falls below -0.7.
    Once the amplitude of the incoming waveform falls below -0.7, the output is 0 and is latched until the amplitude exceeds 0.7.

    Thanks again for the quick response.
    I am having trouble with the autoindexing: I keep getting data values of 0.
    I have attached a VI that I quickly threw together to show what I am doing.
    Please tell me if my method/reasoning is incorrect.
    Attachments:
    test1.vi ‏25 KB

  • Problem building a trigger using a BLOB field in Oracle 10

    My case is the following,
    I'm trying to implement an AFTER trigger which uses the :new.blob_field to insert the new value in a table. Because of the documented AFTER restriction and :new use for blob fields, I've though to add other BEFORE trigger that calls a procedure in which I can store the :new value and later insert the temporary value in the table when the AFTER trigger is executed.
    The Idea is the following:
    BEFORE trigger :new -> TEMP
    and then
    AFTER trigger uses TEMP to store in the new table
    So, the final questions are the following:
    -Any other idea to do the same, that is, to use the ":new" value in an AFTER trigger?
    -How can I do this with the temp variable, is this correct?:
    PROCEDURE store_blob ( new_val BLOB ) IS
    BEGIN
    DBMS_LOB.CREATETEMPORARY(new_blob_temp,TRUE, DBMS_LOB.SESSION);
    -- fill with data
    DBMS_LOB.COPY (new_blob_temp,new_val,DBMS_LOB.GETLENGTH(new_val),1,1);
    END store_blob ;
    Because of the design of the application I have to use the AFTER trigger to store the new value so I must find a solution for this type of fields.
    Sorry for the size of the text and also for my english.
    Thanks in advance

    SQL> create or replace trigger trg1 after insert on test_blob for each row
      2  begin
      3  insert into test_blob2 values (:new.a);
      4  end;
      5  /
    Trigger created.
    SQL> insert into test_blob values ('123456789');
    1 row created.
    SQL> desc test_blob;
    Name                                      Null?    Type
    A                                                  BLOB
    SQL> desc test_blob2
    Name                                      Null?    Type
    A                                                  BLOB
    SQL>
    SQL> select dbms_lob.getlength(a) from  test_blob2;
    DBMS_LOB.GETLENGTH(A)
                        5

  • How to create conditional update trigger in sql server

    How to create conditional update trigger in sql server

    You cant create a conditional update trigger. Once you create an update trigger it will get called for every update action. However you could write logic inside it to make it do your activity based on your condition using IF condition statement
    Say for example if you've table with 6 columns and you want some logic to be implemented on update trigger only if col3 and col5 are participating in update operation you can write trigger like this
    CREATE TRIGGER Trg_TableName_Upd
    ON TableName
    FOR UPDATE
    AS
    BEGIN
    IF UPDATE(Col3) OR UPDATE (Col5)
    BEGIN
    ....your actual logic here
    END
    END
    UPDATE() function will check if column was involved in update operation and returns a boolean result
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Time trigger for refreshing the screen

    Hi all,
    How to implement the time trigger for refreshing the screen after some time interval .
    Thanks in advance .

    hello Naval ,
    set the delay propert Eg : 10
    in the on action of the Time trigger Ui
    invalidate the node of table .
    write the select query for retrivig the PO from table into Itab .
    bind the internal table to the node ...
    But for your requirement it will efficient if you implement POWL query .
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60f1d5ee-84ab-2c10-ce97-97dfd89bc238?quicklink=index&overridelayout=true]
    Regards
    Chinnaiya  P

  • Fpga NI 9223 Trigger

    Hi, 
    I'm using LabView FPGA with NI 9223. I have a signal that I would like to measure with a trigger so I may study and measure the signal. I am able to read the signal, but it isn't much use to me without the trigger. Has any found out how to implement an analog trigger with NI 9223 card or perhaps using it along with another card?

    Hello SMestril,
    You can certaintly develop an application with the 9223 on a RIO platform that will respond to an analog threshold trigger and then respond as you see fit. A good white paper that outlines how this can be achieved can be found in the following link: http://zone.ni.com/devzone/cda/tut/p/id/3236.
    Best,
    Blayne Kettlewell

  • Security Trigger Question?

    Hi all,
    I'm trying to create a trigger which will allow only certain users to issue DML statements on a table.
    The users who have access are returned from a sql query.
    The trigger I have created looks like the following,
    CREATE OR REPLACE TRIGGER test          
    BEFORE INSERT OR UPDATE OR DELETE
    ON project
    DECLARE     
    CURSOR user_cur IS
       SELECT e.emp_id
       FROM employee e, org_unit o
       WHERE e.ou_id = o.ou_id
       AND o.ou_name = 'Innovation North';
    v_user NUMBER;
    v_cur_user VARCHAR2(10);
    begin
    OPEN user_cur;
      LOOP
       FETCH user_cur INTO v_user;
       EXIT WHEN user_cur%NOTFOUND;
        SELECT user INTO v_cur_user FROM dual;
        IF v_cur_user <> v_user THEN
         RAISE_APPLICATION_ERROR(-20001, 'User: '|| v_cur_user ||' does not have authority to update this table');
        END IF;
      END LOOP;
    CLOSE user_cur;
    END;
    /I'm pretty sure the trigger works fine, however, for this to work, does each user need this trigger in there own schema's, or is there some way of implementing a system trigger which works for all users?
    I know this problem can be achieved using much simpler techniques but i'm investigating alternative methods.
    Cheers guys!

    I'm pretty sure the trigger works fineWell, as e.emp_id would seem to be number and USER is not allowed to be all numeric it seems to me that this trigger will always fail.
    I know this problem can be achieved using much simpler techniques What I think you are groping towards implementing is Row Level Security (aka Virtual Private Database). This works well in Oracle from 8.1.7 onwards.
    If you don't want to use RLS (or don't want to pay for the enterprise edition) I suggest you start looking at using views. This trigger-based approach is really a bad idea, being both inflexible, slow and excessively punitive towards the users.
    Cheers, APC

  • Trigger call procedure - Commit not allow

    Hi all,</p>
    <p style="margin-top: 0; margin-bottom: 0">I need help.</p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0">I have One table name</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
    <font FACE="Courier" SIZE="2" COLOR="#808000">EVENTS. </font></font>
    <font FACE="Courier" SIZE="2">I have create two trigger on that table. </p>
    <p style="margin-top: 0; margin-bottom: 0">Trigger 1 is to add a running number
    to events table into "id" column.</p>
    <p style="margin-top: 0; margin-bottom: 0">Trigger 2 is to pass that running
    number in to other procedure after the new row in events complete fill in
    database.</p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0">The error is : Commit not allow in
    trigger.</p>
    <p style="margin-top: 0; margin-bottom: 0">The commit is only on my procedure.
    How i want to make it run? Help me.</p>
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    </font><font FACE="Courier" SIZE="2" color="#FF0000">
    <p style="margin-top: 0; margin-bottom: 0"><b>TRIGGER 1</b></p>
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
    <p style="margin-top: 0; margin-bottom: 0">CREATE<font FACE="Courier" SIZE="2">
    </font>OR<font FACE="Courier" SIZE="2"> </font>REPLACE<font FACE="Courier" SIZE="2">
    </font>TRIGGER<font FACE="Courier" SIZE="2"> AUTONUM_EVENTS_ID1</p>
    </font>
    <p style="margin-top: 0; margin-bottom: 0">BEFORE<font FACE="Courier" SIZE="2">
    </font>INSERT</p>
    <p style="margin-top: 0; margin-bottom: 0">ON<font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#808000">EVENTS</font></p>
    <p style="margin-top: 0; margin-bottom: 0">REFERENCING<font FACE="Courier" SIZE="2">
    </font>NEW<font FACE="Courier" SIZE="2"> </font>AS<font FACE="Courier" SIZE="2">
    </font>NEW<font FACE="Courier" SIZE="2"> </font>OLD<font FACE="Courier" SIZE="2">
    </font>AS<font FACE="Courier" SIZE="2"> </font>OLD</p>
    <p style="margin-top: 0; margin-bottom: 0">FOR<font FACE="Courier" SIZE="2">
    </font>EACH<font FACE="Courier" SIZE="2"> </font>ROW</p>
    <p style="margin-top: 0; margin-bottom: 0">begin</p>
    <p style="margin-top: 0; margin-bottom: 0">    select<font FACE="Courier" SIZE="2">
    EVENTS_ID_SEQ</font>.nextval<font FACE="Courier" SIZE="2"> </font>into<font FACE="Courier" SIZE="2">
    </font>:new.ID<font FACE="Courier" SIZE="2"> </font>from<font FACE="Courier" SIZE="2">
    dual</font>;</p>
    <p style="margin-top: 0; margin-bottom: 0">end;</p>
    <p style="margin-top: 0; margin-bottom: 0">/</p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0">
    <font FACE="Courier" SIZE="2" color="#FF0000"><b>TRIGGER 2</b></font></p>
    <p style="margin-top: 0; margin-bottom: 0">CREATE</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">OR</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">REPLACE</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">TRIGGER</font><font FACE="Courier" SIZE="2">
    PROCESSINFO</p>
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
    <p style="margin-top: 0; margin-bottom: 0">AFTER</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">INSERT</p>
    <p style="margin-top: 0; margin-bottom: 0">ON</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#808000">EVENTS</font></p>
    <font FACE="Courier" SIZE="2" COLOR="#0000ff">
    <p style="margin-top: 0; margin-bottom: 0">REFERENCING</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">NEW</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">AS</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">NEW</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">OLD</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">AS</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">OLD</p>
    <p style="margin-top: 0; margin-bottom: 0">FOR</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">EACH</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">ROW</p>
    <p style="margin-top: 0; margin-bottom: 0">DECLARE</p>
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
    <p style="margin-top: 0; margin-bottom: 0">BEGIN</p>
    </font><font FACE="Courier" SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font FACE="Courier" SIZE="2" COLOR="#808000">    UpdateInfo</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">(:new.ID);</p>
    </font><font FACE="Courier" SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font FACE="Courier" SIZE="2" COLOR="#0000ff">EXCEPTION</p>
    </font><font FACE="Courier" SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font FACE="Courier" SIZE="2" COLOR="#0000ff">WHEN</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#ff0000">OTHERS</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">THEN</p>
    </font><font FACE="Courier" SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font FACE="Courier" SIZE="2" COLOR="#008000"><i>-- Consider logging the error
    and then re-raise</p>
    </i></font><font FACE="Courier" SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font FACE="Courier" SIZE="2" COLOR="#0000ff">RAISE;</p>
    <p style="margin-top: 0; margin-bottom: 0">END</font><font FACE="Courier" SIZE="2">
    PROCESSINFO</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">;</p>
    <p style="margin-top: 0; margin-bottom: 0">/</p>
    </font>

    Because of the following :
    Restrictions on Trigger Implementation The implementation of a trigger is subject to the following restrictions:
          The PL/SQL block of a trigger cannot contain transaction control SQL statements (COMMIT, ROLLBACK, SAVEPOINT, and SET CONSTRAINT) if the block is executed within the same transaction.If you really want to do a commit then search for autonomous transaction.
    Hope that helps
    Regards
    Raj

  • Trigger not responding & extremely noisy acquisition

    I have constructed a
    - N channel
    - N Samples
    - Analog Triggered
    Data Acqusition system. The program was working fine except that the singals were unsually noisy.
    So I replaced a regular ribbon cable with a shielded one. However when doing this I did not turn off the computer.
    Now the board does not trigger with the regular trigger pin(TRIG1). I checked the impedence of the pin and found that it was really low.
    Does this mean that the pin is damaged?
    I tried to use TRIG2 but it works sometimes and not at other times.
    The other analog input channels seem to be working fine.
    The unusual amount of noise also remains. (Which cause the acquisition to trigger even when there is no signal and hence is very an
    noying)
    Thanks.
    NI Software : LabVIEW version 7.0
    NI Hardware : Multifunction DAQ device PCI-6023E
    Driver Version : MAX 2.0
    OS : Windows 2000

    Hello,
    Thank you for contacting National Instruments.
    PFI0/TRIG1 and PFI1/TRIG2 should operate in the same fashion. You should be able to implement a digital trigger using either connection. A digital trigger will fire when an edge is detected on a particular pin. You can configure a rising or falling edge trigger. The trigger input accepts a TTL level signal which means if you have a rising edge trigger configured, the trigger will fire once the voltage changes from 0V to at least 2V. If this transition occurs the trigger will fire. Therefore, if you have noise spikes on your trigger signal that are large enough to trigger your acquisition, you will need to add some type of filter to remove the high frequencies of the noise. This can usually be acc
    omplished with a simple single-pole RC filter.
    If you feel confident that your PFI0/TRIG1 pin is damaged, you can return your board to be repaired. However, in most cases you should be able to get by using either PFI1/TRIG2 or one of the other six PFI lines.
    Regards,
    Bill B
    Applications Engineer
    National Instruments

  • How to trigger an event every time BSID table is updated?

    Dear all,
    I have a request at my company to develop/implement/configure a trigger to BSID standard table, to catch all records inserted and perform some calculations with the field WRBTR. I must do this whenever a record is inserted.
    Thank you in advance, i hope you will understand my poor english.
    Kind Regards,
    /S. Nuvunga

    You need to do customization for the archivelink. In this you can also set the workflow which should be started. This isn't done using a change document or an event.
    Check the customizing, there are several nodes there you need to customize. Read the help in customizing for those steps. Check in customizing under:
    Application server --> Basic services --> Archivelink
    There are several nodes which need to be configured.
    Regards,
    Martin

  • ASA in transparent mode and IP addresses

    Hello,
    I need to put an ASA in transparent mode.
    Our router (managed by the carrier) routes more than one public IP class in a single VLAN.
    On the "Cisco Security Appliance Command Line Configuration guide", in "Trasnaprent Firewall Guidelines" it's written: "Each directly connected network must be on the same network".
    This means also that I can have ONLY ONE subnet that flows fron the outside and the inside, or can I have more than one class?
    If I can have only one class, the only solution is to use multiple context (and separate each classes in different interfaces)?
    Thanks a lot

    The ASA in trasparent mode works at layer 2. So it really does not care if the traffic that flows through it is from different subnet as long as the L3 devices it connects to knows how to reach these subnet. TheASA in transparent is basically a bump in the wire (a bridge) and for that reason you can only use 2 interfaces on the ASA in transparent implementation.
    P.S. When people see attitude in your threads, they will refrain from answering your question. That's for future reference.

  • BIG Trigger Problem!!!

    Hi friends,
    I need to write a before insert and update trigger,that Select and (insert respectively update) the same table.
    I tried some solutions
    like the solution of Tom -->askTom
    here is the Link http://asktom.oracle.com/~tkyte/Mutate/index.html
    but that don't work for me. The problem is that I have
    first to select something from Table A and then
    check this with the values which have to be inserted or updated in Table A. Only when the the new values(from one column) are not in Table A they can be inserted or updated.Otherwise the Trigger have to raise an error.
    Can somebody tell me a way how to implement such a trigger???Please with an example.
    thanxx
    Schoeib

    As far as I know there is no easy solution for this. There is a good reason why Oracle throws the mutating table exception in its BEFORE triggers. One possible way round it is to use a view with an INSTEAD OF trigger on it, and prevent people have direct access to the table..
    However, it does seem to be as though you are trying to get the database to resolve problems that really ought to solved at the front-end. If at all possible you should try to correct whatever application is entering data into your system.
    Cheers, APC

  • Rollback inside Trigger

    Hello,
    I have a requirement to:
    When a row is deleted from the table EMP and if the EMP_TYPE='Manager'
    then the record should not be deleted.
    Same will happen while UPDATE.
    Since we cannot use ROLLBACK, then how to implement this using trigger ?

    As dnikiforov said you can just raise an exception to handle it.
    Here a sample code is;
    CREATE OR REPLACE TRIGGER TriggerName
    BEFORE UPDATE OR DELETE ON TableName
    FOR EACH ROW
    BEGIN
         IF DELETING THEN
              IF :OLD.EMP_TYPE = 'Manager' THEN
                   RAISE_APPLICATION_ERROR(-20001,'Delete Not Allowed For Manager!');
              END IF;
         END IF;
    END;
    you can use this logic to do so.
    Anddy

  • Sequence problem plus

    Hi, I have some questions regarding sequences and more
    In short,
    I want to implement a table column that will be an autoincrement int.
    This is used as a PK to another table that holds accounting records.
    I use a cashed sequence to get autonumbers.
    Also I want this column to show always the current value of the sequence (thus the last PK used on the records table), in order to be treated like an updatable column.
    I will then implement an update trigger in the table holding the column in order for the sequence to be altered accordingly whenever an update occurs.
    So this column is behaving like a pseudocolumn.
    Can u please comment on this or give some insight on how this can be done?
    Thanks in advance,
    teo

    If you have to reset the sequence to a specific value, then the easiest way is to drop and recreate the sequence. If you increment/decrement, then the only way is that posted by Gints, that is
    ALTER SEQUENCE DSE INCREMENT BY a number
    SELECT DSE.NEXTVAL from dual
    ALTER SEQUENCE DSE INCREMENT BY 1
    If not, the increment will work at next nextval. Example :
    SCOTT@orcl SQL> create sequence s1 start with 100;
    Sequence created.
    SCOTT@orcl SQL> select s1.nextval from dual;
       NEXTVAL
           100
    SCOTT@orcl SQL> alter sequence s1 increment by 10;
    Sequence altered.
    SCOTT@orcl SQL> select s1.nextval from dual;
       NEXTVAL
           110
    SCOTT@orcl SQL> select s1.nextval from dual;
       NEXTVAL
           120
    SCOTT@orcl SQL>                                                                                        

Maybe you are looking for

  • Can I format my time capsule 2TB to ntfs to use it on a PC and mac as an online HHD?

    Hi, I wave a 2TB Time Capsule and a net of 4 macs and 1 PC I need to use the Time Capsule as an online HHD but it is on fat 32 format, its any  way to re format the disc to ntfs to can save files larger than 4GB? and still use the Time Machine functi

  • Error while deploying the model

    Dear All, When i try to deploy my developed model the Visual composer shows the following script error- http://<servername>:50000/VCRes/webContent/VisualCompser/6.00/bin/15595730.htm?122007.65 can any one provide the solution to get rid of this error

  • Can I add a USB hard drive to the time capsule

    I am wanting to know if one could add an external HD to the USB port on the time capsule? 

  • Quicktime Pro won't recognize my video camera.

    The video camera is attached to the computer via Firewire. I checked and the computer recognizes that the camera is attached by Firewire. I'm trying to transfer already-shot video from the video camera into Quictime Pro, but when I turn on the camera

  • Spry Tabbed Panel 2.0 Problem

    I have used the Spry Tabbed Panel 2.0 in DWCS5 and 6 html pages before without a problem. However, last week I tried to add a panel to an html page and while it works lovally in live view locally, I get errors that appear to be a path problem, but I