×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Concatenating Columns in Query Expression

Concatenating Columns in Query Expression

Concatenating Columns in Query Expression

(OP)
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

RE: Concatenating Columns in Query Expression

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 :
http://www.learn-peoplesoft.blogspot.com

RE: Concatenating Columns in Query Expression

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close