If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > auto number with leading zeros

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-24-06, 11:48
ceiridwyn ceiridwyn is offline
Registered User
 
Join Date: Jan 2006
Posts: 7
auto number with leading zeros

I need my database form to programmatically go to the next available number when a check box is set to "yes". This next number in sequence should be five digits, with leading zeros. I'm stumped.
Reply With Quote
  #2 (permalink)  
Old 01-24-06, 11:53
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
Sounds like you are trying to impose a meaning on an autonumber field.....

within most db engines you can't do that. I suppose you could put a constraint to check the autonumber field was in range 1..99999.

you could handle the leading zeros by formatting in your front end / user interface

BTW what forn end are you using, waht data / SQL engien are you using
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On