Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    1

    Question Unanswered: Simple SQL syntax question

    I am a newbie to SQL code:

    I want to update mytable.ref_id with a sequential number after it is ordered by mytable.date starting with '00001' and the next record having '00002' and so on.

    What is the SQL statement to do this?

    Thanks in advance.

    Steve

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    modify the column of type identiy then you need not to care about it. Sybase does.

    But keep in mind the buring factor and if deletions occur the sequence/identity will not be recycled
    details can be obtained from rob verschoor's web site www.syspron.nl

Posting Permissions

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