• NA
  • 15
  • 7.6k

Datebase query based on serial number in sql server

Apr 4 2012 8:05 AM


                     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

Answers (5)