how to auto increment a column in a specific format
I have a column name JobCode , i want it to increment automatic in the formate A-1, A-2....A-200 then it should start from B-1,B-2...B-200 and so on upto Z-1...Z-200....!! i want to code to save the column value into sql server database.
Jignesh TrivediPosted Mar 7, 2013, 10:57 PM
please refer below blog link, it might help you.
http://beta.c-sharpcorner.com/Forums/Thread/163919/hi-how-to-auto-increment-for-text-and-char-in-sql-table.aspx
Mustaq KhanPosted Mar 7, 2013, 7:18 AM
VulpesPosted Mar 7, 2013, 5:18 AM
Mustaq KhanPosted Mar 7, 2013, 4:24 AM
But i want the code in Window appln C#...i don't want to print Jobcode......
i only want the jobCode to increment automatically with every new customer in the database..!!!
VulpesPosted Mar 6, 2013, 6:22 AM
However, it's fairly easy to generate the job codes yourself as the following console application shows:
The output should be: