MAX()+1 within INSERT statement

chris-uk-lad

Registered User.
Local time
Today, 01:27
Joined
Jul 8, 2008
Messages
271
Hi all,

I have a table that i wish to update but am having trouble due to my value ItemNum. I need this to be the next highest (max+
1) number in the column ItemNum (for a script, this is not an autonumber column).

In essence what im trying to contsruct is:

insert into TABLE1 (New1, Status, ItemNum) values (
'100', 'A', max(ItemNum)+1
)

But not yet found a working method. All help appreciated

Thanks.
 

Users who are viewing this thread

Back
Top Bottom