1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

oracle forms

Discussion in 'Oracle Forms and Reports' started by Awanish, Nov 27, 2009.

  1. Awanish

    Awanish Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    75
    i used pre-insert trigger in my form for generate sequence number 1.2.3.4...... how much line user want to insert.in there we not use sequence bcoz sequence generate the continue no till its maxsize.
    i used that query but not generate the no(if its wrong then how it is possible)

    BEGIN
    SELECT count( track_id ) + 1
    INTO :tracks.track_id
    FROM tracks;
    END;
     
  2. williams22

    williams22 Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    I think its simple to follow and very easy to use..
     
  3. Bharat

    Bharat Community Moderator Forum Guru

    Messages:
    1,747
    Likes Received:
    147
    Trophy Points:
    1,805
    Location:
    Vijayawada, India
    Hi awanish,

    you have written select statement so the table (tracks) doesn't update any value. When that table contains count(track_id)=10 then your query returns 11 every time of its execution. So it doesn't generate any other value. Better you can use sequence and give a try. if not try to update that table every time with 1 value then you can generate sequence numbers.