Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2013
    Posts
    15

    Unanswered: Using CONCAT with TRIM

    I have a first name and last name fields that have trailing spaces so I removed them with TRIM then I wanted to CONCAT the two fields below with a space in the middle. I'm able to do the CONCAT with no trouble but when I put in the TRIM function I get errors so I'm sure I'm doing the syntax incorrectly.

    , TRIM(T FROM BCCDCD.CDCD_FIRST) AS FNAME
    , TRIM(T FROM BCCDCD.CDCD_LAST) AS LNAME


    Any help would be appreciated. Thanks!
    Last edited by dotsofcolor; 09-18-13 at 11:56.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Code:
    TRIM(BCCDCD.CDCD_FIRST) || ' ' || TRIM(BCCDCD.CDCD_LAST) AS FULLNAME
    Andy

  3. #3
    Join Date
    Jun 2013
    Posts
    15

    Cool

    Excellent Andy, worked perfect.

    I see I was making my syntax more complicated than it needed to be on the CONCAT. I was adding in the TRIM(TRAILING FROM part which I'm guessing was not the way to go.

    Thanks so much for your help! Now I can move on.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •