Results 1 to 2 of 2

Thread: Seq value

  1. #1
    Join Date
    Jan 2005
    Posts
    10

    Unanswered: Seq value

    FOR i IN r1 LOOP
    std_id := pkg_util.get_table_seq_nextval ('STUDENT');

    first_seq := std_id;

    select statement

    insert statement


    last_seq := std_id;

    I dont want the first_se value to change, I want to store the first seq value in that variable but I want the last_seq value too, How to do this

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Try this:
    Code:
    std_id := pkg_util.get_table_seq_nextval ('STUDENT');
    first_seq := std_id;
    FOR i IN r1 LOOP
    select statement
    insert statement
    last_seq := std_id;
    std_id := pkg_util.get_table_seq_nextval ('STUDENT');
    END LOOP:
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •