zero padding

  • I would like to be able to zero pad and at the same time increment it sequentially:

    123 padded with 0001 = 123001, 123002, 123003, 123004.....

    Thanks for all the help

  • Something like this?

    SELECT 123 * 1000 + number + 1

    FROM master..spt_values

    WHERE TYPE='P' AND number < 999



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply