Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2006
    Posts
    1

    Unanswered: DB2 Sequence Object PREVVAL

    Hi,

    I was just wondering if you guys have experience with SELECTING PREVVAL from a sequence object. It seems that evertime I start a new session and directly try to get the prevval from the sequence object it throws an exception saying that the sequence object has not been initialized.

    Any suggestion on how to solve it?

    J

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Try reading the manual

  3. #3
    Join Date
    Oct 2004
    Location
    DELHI INDIA
    Posts
    338
    how you created the Sequence?

    try the one: CREATE SEQUENCE seq_test1 AS INTEGER START WITH 1 INCREMENT BY 1

    and then query for PREVVAL for seq_test1.

  4. #4
    Join Date
    Nov 2002
    Posts
    14
    You need to call NEXTVAL before PREVVAL.

Posting Permissions

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