Click here to Skip to main content
16,005,734 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a column named :fname, mi, lname and i want to make it fname<space>mi<space>lname. i want to make it as one column for checking purposes. does anyone had an idea? thanks
Posted

Hi use below query

SQL
SELECT (fname + ' ' + mi + ' ' + lname) as FullName
FROM table
 
Share this answer
 
Comments
newbie011292 24-Feb-12 21:06pm    
SELECT (fname + ' ' + mi + ' ' + lname) as FullName
FROM table WHERE FullName

is this possible?
SQL
SELECT fname + ' ' + mi + ' ' + lname as combiname
FROM table
WHERE ...


That should do the trick.

Regards,

Manfred
 
Share this answer
 
Comments
newbie011292 24-Feb-12 18:19pm    
i got errors my query SELECT fname + ' ' + mi + ' ' + lname as combiname
FROM table
WHERE combinename = '"+textBox1.Text+"'
select fname + ' ' + mi + ' ' + lname as MyColumn from table

should work I guess...
 
Share this answer
 
Comments
newbie011292 24-Feb-12 18:20pm    
i got errors my query SELECT fname + ' ' + mi + ' ' + lname as myColumn
FROM table
WHERE myColumn = '"+textBox1.Text+"'

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