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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenating Columns in Query Expression

Status
Not open for further replies.

Jean9

Programmer
Dec 6, 2004
128
US
I would like to be able to concatenate several data columns in an expression to add to the query. I have tried concatenating with the following symbols without success:
&
||
+
space

I have used the comma symbol with success in that I do not get an error but only the last field of the concatenated string is being displayed.

What should be the syntax of the concatenation, please?
Thanks in advance,
J9
 
Can you give us some more examples?

Here's what i used to get the concatenation from PS Query

SELECT A.LAST_NAME || ' , ' || A.FIRST_NAME
FROM PS_NAMES A
WHERE A.EFFDT =
(SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED
WHERE A.EMPLID = A_ED.EMPLID
AND A.NAME_TYPE = A_ED.NAME_TYPE
AND A_ED.EFFDT <= SYSDATE)
AND A.EMPLID = '0123456'

Expression if of character - 100 length

A.LAST_NAME || ' , ' || A.FIRST_NAME




Learn PeopleSoft Payroll Functional :
 
You are correct. I don't know what I did the first time when I used the pipe symbols and got that error. I tried it again and it worked fine. Thank you for your quick response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top