Click here to Skip to main content
15,937,779 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi to all!

here is my querry
insert into TableName values(@id,@Name,cast(@id as varchar(50))+@Name)

e.g. id= 123 name=asdf then iname=123asdf but i want like this asdf123 how to do this
Updated 3-Aug-11 21:03pm

Just interchange it.
insert into TableName values(@id,@Name,@Name+cast(@id as varchar(50)))
Share this answer
RaisKazi 4-Aug-11 3:05am    
Simple and Correct. 5!
kami124 4-Aug-11 3:08am    
why dont you take name first and then id to add
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900