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 |
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-05-29 : 03:36:37
|
Hi all,My table isuserid username1 user12 user2..Here Userid is primarykey and auto increment, username is unique keyhow i write the insert statement to insert into my table with appending 'user'??Help me!Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-05-29 : 03:38:36
|
[code]insert into yourtable(username) values (@username)[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-05-29 : 04:35:02
|
sorry khtan,I can't understand your answer, I want to generate Username like user1,user2,..where 1,2... are useridSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-05-29 : 05:19:31
|
[code]select username = 'user' + convert(varchar(10), userid)from yourtable[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|