Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT - Concatenating 2 columns together? 1

Status
Not open for further replies.

wellster34

Programmer
Sep 4, 2001
113
CA
Hi,

Is it possible to concatenate two columns from a SELECT query into 1? I perform the following SELECT statement and provide the results into a Comma Separated File (CSV)

SELECT Eemast.empnum, Eemast.fname, Eemast.lname;
FROM Eemast;
WHERE Eemast.empstatus == "A" INTO CURSOR hrweb

I want to concatenate Eemast.fname, Eemast.lname into one column. Right now, the query shows the data as follows:

"000000","JOHN","DOE"

Is it possible to have it returned as:

"000000","JOHN DOE"

Does anyone know if this is possible or not?

Thanks for your time.
 
SELECT Eemast.empnum,;
ALLTRIM(Eemast.fname)+" "+ ALLTRIM(Eemast.lname) AS name;
FROM Eemast;
WHERE Eemast.empstatus == "A";
INTO CURSOR hrweb

Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top