Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2007
    Posts
    127

    Unanswered: Concatenate Fields

    I’m trying to concatenate four fields from the same table –

    Pat_Ind: [PatInd1] & [PatInd2] & [PatInd3] & [PatInd4]

    Unfortunately the fields in the table contain white spacing “ “… hope you understand!

    I try typing IS NULL in the criteria but it does remove them…

    Thanks in advance

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    try [PatInd1] + [PatInd2] + [PatInd3] + [PatInd4]
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2007
    Posts
    127
    Quote Originally Posted by r937
    try [PatInd1] + [PatInd2] + [PatInd3] + [PatInd4]
    doesn't seem to be giving me the results I want...

    It only shows results if all fields are populated ([PatInd1] to [PatInd4])..

    What if column [PatInd3] is empy?

    It will not show results from [PatInd1] and [PatInd1]

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    sorry, i guess i assumed null whereas you actually did mean empty
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Feb 2007
    Posts
    348
    they literally contain a single space in them?
    I guess you have to test for the value than add or not based on that outcome.

Posting Permissions

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