How to get full name of the employer by getting rid of null values in between

  • Web mark up language as will remove double spaces, and replace with a single space, unless inside the correct tags. Using the code IFCode tag will fix this for you.

    Basic HTML stuff 😉

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • marc.corbeel (10/14/2016)


    Sean Lange (10/14/2016)


    marc.corbeel (10/14/2016)


    Forum admin... this is creepy!

    I paste a peace of code text with a double space in it, in the topic reply text box, and once saved, the double space is replaced by a single one...

    Put in a code box. You can use the IFCode shortcuts on the left when you are posting.

    okay, didn't know that, thank you.

    Yeah the formatting on this forum is less than excellent a lot of the time. They have been working on an entirely new front end for quite some time. As you can imagine that must be a big undertaking. Hopefully we will get some insight when it might be done soon.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Yes I have seen the difference. The way I put the code have some spaces in between the FirstName and the LastName. The way you put doenot contain any extra spaces. Thankyou so much

  • marc.corbeel (10/14/2016)


    This is strange...

    when I copy from my SQL studio Manager to this forum, each time the double space is replaced by single one

    Anyone knows this issue???

    It's because you didn't place your code in code tags, so it's treating it as HTML which collapses multiple white spaces into a single space.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • SELECT ID ,

    RTRIM(CONCAT(s.FirstName + ' ', s.MiddleName + ' ', s.LastName)) AS FullName

    FROM #something AS s;

    Wes
    (A solid design is always preferable to a creative workaround)

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply