Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Formatted ID

Author  Topic 

donpolix
Yak Posting Veteran

97 Posts

Posted - 2005-08-22 : 00:09:39
Hi guys! Is it possible to create an identity column that will store data like this?
UK000001
UK000002
UK000003
.
.
.

Can I do this w/out using computed columns? Please advise on what approach is the best. Thanks!

Donn Policarpio

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-08-22 : 06:23:28
No. If the 'UK' bit is for presentation reasons (and fixed in value)....put it in that layer. Otherwise a computed column is required.
Go to Top of Page

mpetanovitch
Yak Posting Veteran

52 Posts

Posted - 2005-08-22 : 13:43:13
agreed, i've creating a user defined function which does the formating for me, if you want to put it in the db layer. All you need to remember is to call the function in the appriopriate selects


Mike Petanovitch
Go to Top of Page

bell27

4 Posts

Posted - 2005-08-23 : 11:01:33
Well that was a bit messed up...


<edit> spam links removed </edit>
Go to Top of Page
   

- Advertisement -