I'm rather new to SQL Server. I hope you can guide me to the right solution.
PROBLEM: I need a column that will automatically generate the following data when a new record is created: P123 (Therefore the format is to start with the letter P followed by some auto increment number)
I have a primary key column that auto increments everytime a new record is added so 101, 102, 103, etc... I understand the primary key cannot contain letters so I created another column called acctnumber. I want the acctnumber column to automatically generate an account number in the format of P123 when a new record is inserted.
Again I'm just trying to find a way for the SQL server to automatically generate an account number when a new record is provided.
Thanks so much in advance for your help. I'm still learning.
PROBLEM: I need a column that will automatically generate the following data when a new record is created: P123 (Therefore the format is to start with the letter P followed by some auto increment number)
I have a primary key column that auto increments everytime a new record is added so 101, 102, 103, etc... I understand the primary key cannot contain letters so I created another column called acctnumber. I want the acctnumber column to automatically generate an account number in the format of P123 when a new record is inserted.
Again I'm just trying to find a way for the SQL server to automatically generate an account number when a new record is provided.
Thanks so much in advance for your help. I'm still learning.