alpha numeric auto number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 Tables
the tables have auto number fields

1. Purchase
PurTransId (auto number)

2. Sales
transId (auto number)

they both start from 1
i need to change them with alpha numeric numbers (something like pur001) and
(sal001)

is this possible?
 
Not really. You could apply a format of \p\u\r000000 or \s\a\l000000 to the
respective fields, so that it would look as though they have a prefix, but
it wouldn't actually be stored in the table, which would probably lead to
problems when attempting to join with other tables.

However, why do you want to do this? Autonumbers have one purpose only: to
provide a (practically guaranteed) unique value that can be used as a
primary key. Adding the letters at the front doesn't make the key any "more
unique". You should never try and assign meaning to the value of an
autonumber field. In fact, it's unusual to even show the value of an
autonumber field to your end users.
 
Back
Top