April 4th, 2012, 07:12 AM
Sql server query for oncrementing Serial Number
I am working on a C# application where i have to store values of article in sql server as i have 3 products (stone, diamonds, jewellery). Now during the initial process when i enter the product details let say i have to store value for a diamonds i put in the required details, now i want that in the database a sno value should be stored as a increment counter(D001) next time when i enter details for diamond the sno should be automatically stored as 002. Same is the case with stone , jewellery.
Diamonds: D001, D003, D003.....
Jewellery : J001, J002, J003.....
Stone: S001, S002, S003.....these all should be stored as sno in same database table. is it possible. Please help me through. waiting for are reply.Thanks in anticipation
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.