SQL Server 2k Formula
-
I cannot find documentation/tutorials ANYWHERE for SQL Server 2000. All I want to do is increment my primary key automatically with a predefined "first two chars". For instance, when I take a New User request from my web site, I want my PK to be NU1, auto incrememnt NU2, NU3, etc...I'm sure it's a cinch...can anybody tell me how? P.S. I have really benefited by using this site. Thanks for everyone's help on past questions. Hopefully, I'll be able to help answer questions one day!:-O
-
I cannot find documentation/tutorials ANYWHERE for SQL Server 2000. All I want to do is increment my primary key automatically with a predefined "first two chars". For instance, when I take a New User request from my web site, I want my PK to be NU1, auto incrememnt NU2, NU3, etc...I'm sure it's a cinch...can anybody tell me how? P.S. I have really benefited by using this site. Thanks for everyone's help on past questions. Hopefully, I'll be able to help answer questions one day!:-O
How about using an "instead of" trigger. Search for triggers in BOL and you should find loads of info.