Hi Everyone,
I have a table Customer with an AccountNumber field (nvchar20). The user can set this 'number' by itself. But if the user leaves it blank I want Sql server fill it up with the next highest numeric value in the column.
AccountNumber (nvarchar(20)
--------------
000001
ABC9123
000002
TEST789
......
On the dots (empty AccountNumber), I want 000003 to appear. How do I go about this?
Pampers![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)
Keeping it simple can be complicated
I have a table Customer with an AccountNumber field (nvchar20). The user can set this 'number' by itself. But if the user leaves it blank I want Sql server fill it up with the next highest numeric value in the column.
AccountNumber (nvarchar(20)
--------------
000001
ABC9123
000002
TEST789
......
On the dots (empty AccountNumber), I want 000003 to appear. How do I go about this?
Pampers
![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)
Keeping it simple can be complicated