The 'key' is the primary key which is in the same table, what I really need is something like an IDENTITY, but with the character 'X' and the last to digits of the year added on the front. Is there another way to update the field automatically like an IDENTITY would do.
Please I need some help, I am using SQL Server 7 and need to make a trigger that automatically updates a table with a key when rows are inserted or updated. The key has to be in the form 'XYY00001', where 'X' is a character, 'YY' is the last to digits of the current year and '00001' is a serial...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.