0

Hi all,

I am creating a windows application. I have a column in the backend - MS sql server 2005 as ID which stores Patient Id.

The values for this column should start with
PT and contain the serial numbers in ascending order.

Eg.
PT001
PT002
PT003

I want to generate this automatically however identity does not allow this type of values.

Then how can I do this?

Is there any way I could do this automatically?

Please help me out!
Thanks in advance!!

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by __avd
0

Use substring to seperate alphabets and digits and convert digits into to numeric for increments, append zeors and concat them.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.