Increment master number

leighturner

Registered User.
Local time
Today, 14:38
Joined
Dec 6, 2010
Messages
16
I would like to increment a value stored in my sys table by 1 for every record in my query.

ID PalNo
1 100

Initially I though counting this field would do the job, for example:
Pallet: (Count[PalNo]+1)

Help please!
 
I'm a little unclear about what you are asking. Do you just want to add 1 to the value in the PalNo field for those records returned in a query (i.e. change only what is displayed by the query) or do you want to change the value by 1 in the underlying table for those records returned by a query (i.e. an update query)?
 
Hi jzwp22,

I just want to add 1 to the PalNo value for every record.

Thanks in advance.
 
Then you just need to create and run an update query. Please make a backup copy of the database prior to running the query just in case you need the original database.

The SQL text of the update query would look something like this (you will have to substitute your own table name):

Update yourtablename SET PalNo=PalNo+1
 

Users who are viewing this thread

Back
Top Bottom