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.
Author |
Topic |
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2009-05-26 : 22:55:28
|
Hii have customer table with username fieldwhat i want to do is when a customer enters his firstname and last name from the front end , i would create a username based on the firstname ,lastnameex:John Carpenter then username is johnC since the username should not exceed 8 characters . If JohnC already exists the it is should insert JohnC1and if johnc1 exists JohnC2....If user firstname is jennifer lastname: Houstonthen username is JennifeH removing r from jennifer but if that already exists then jennifH . It should again check for to see if jennifH exists . If yes the it adds JennifH2...so on.the main criteria is that the username should be only 8 characters.Hope i am clear .thank you in advance .... |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-05-27 : 09:59:28
|
If it is possible - do it in the fron end.Webfred No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|