Increment Field (No Autonum) (1 Viewer)

N

Neocobe

Guest
Hi there,

My question is fairly easy i think (not for me though) ;-)

Besides a standard autonum field i want a second incremental field which i can control in my SQL QUERY.

Something like:

Select EmplNAme, X = (X+3) as Number into Company
from Users

(Using MS ACCESS 2000)

Thank you for your time

Neocobe
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 20:10
Joined
Feb 28, 2001
Messages
27,223
The part I don't understand is the +3 (as opposed to +1)


Are you trying to make a second number APPEAR to be an autonumber? Because you could do a DMax of that column and add a constant to it in an expression.
 
N

Neocobe

Guest
Increment

Hi,

The table I produce is a selction of records (UserNames)
At the same time i want a column wich acts like any kind of counter
Like below

autonum Name Number
1 Peters 3000
2 Petrie 3003
3 Manson 3006

And i want to do that without a reference to the autonum field.

So the query in my opinion could be

Select EmplNAme, X = (X+3) as Number into Company
from Users

After excuting this sql statement i Give the initial value for X (300)
ANd then let it create the table "Company"

Thank you
 

Users who are viewing this thread

Top Bottom