question on sql server 2005
-
hi, i have created a table named CompanyDetails.in this table Company name is one column,and CompanyID is another column,i want when i will enter the company name company id will autogenerated like RXY12365,how i will do it? if i will make companyID as identy column it will generate only int values like 1,2.
p.sethi
-
hi, i have created a table named CompanyDetails.in this table Company name is one column,and CompanyID is another column,i want when i will enter the company name company id will autogenerated like RXY12365,how i will do it? if i will make companyID as identy column it will generate only int values like 1,2.
p.sethi
Please explain this further - RXY12365. Do you need an ID that consists of 3 capital letters and then 5 integers? Should it be random? Why do you need something like this?
-
hi, i have created a table named CompanyDetails.in this table Company name is one column,and CompanyID is another column,i want when i will enter the company name company id will autogenerated like RXY12365,how i will do it? if i will make companyID as identy column it will generate only int values like 1,2.
p.sethi
Using trigger in stored procedure. When insert occurred, edit the companyID.
Work hard, Work effectively.
Own business (desain web) ,Stock Pick Guide. -
hi, i have created a table named CompanyDetails.in this table Company name is one column,and CompanyID is another column,i want when i will enter the company name company id will autogenerated like RXY12365,how i will do it? if i will make companyID as identy column it will generate only int values like 1,2.
p.sethi
Hi Use a trigger, so that the values in the company id are autoincremented/updated/kept same, according to the changes made in the company name.
Keshav Kamat :) India