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

Joining a column with the column value + String

Joining a column with the column value + String

Joining a column with the column value + String

When i have a column comment3' from the table 'TEST'

If i run, the string value n will get added to the start

one record resides in table
comment3 current value = 'pink'

SET comment3 = CONCAT('n',comment3)#

This returns = 'npink'

However i want it the other way. For the value 'n' to be at the end of the string.
I tried reversing the order of sql

SET comment3 = CONCAT(comment3,'n')#

The query ran but the 'n' did not add.

i also tried the comment3 = comment3 + 'n' /query ran but did not add
and then comment3 = 'n' + comment3 /query ran and was successful

Please can you assist how can add the string to the end of the this fields value

Thank you

RE: Joining a column with the column value + String



SET comment3 = CONCAT(comment3,'n')# 
should have worked. Did you get an error or did it not add the 'n'?
If you got an error, what error?
If it didn't add, what if you try:


SET comment3 = CONCAT(rtrim(comment3),'n')# 
to make sure you are putting the 'n' at the end of the actual value in the comment3 field and not at the end of a space padded string.

Certified Pervasive Developer
Certified Pervasive Technician

RE: Joining a column with the column value + String

Thank you mirtheil

the rtrim did the trick. Thank you

The previous way that I was doing it did not give an error nor did it add the 'n'

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