Link to home
Start Free TrialLog in
Avatar of crishna1
crishna1Flag for United States of America

asked on

SELECT statsment

I need a SELECT statement that will combine values from two coulmns and give the output as one, basically concatinate.

I have a table with columns FirstName,LastName,Phone,Email.

I need a select statement that combines the FirstName and LastName and gives the output as one.
Basically i ahev a drop down in the front end which needs to show the entire name.

many thanks!
SOLUTION
Avatar of JMattias
JMattias
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this ...
Select FirstName+' '+LastName Name, Phone, Email
From <YourTable>
Avatar of crishna1

ASKER

thanks for the responce, sorry i forgot to mention, the coumns will be in the where cluase.

say something like,

Select Pers_EmailAddress from QA_Person where Pers_FirstName
+' '+Pers_LastName=values from two coulmns

how do i do it?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
little bit of overcomlication in this case...

SELECT Pers_EmailAddress from QA_Person
WHERE Pers_FirstName = fname AND Pers_LastName = lname

you don't need to combine them in where clause, unless you can elaborate on your "values from two columns" and explain what you exactly mean...

Good luck,
Yurich