+ Reply to Thread
Results 1 to 5 of 5

SQL - Join two columns into one

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    SQL - Join two columns into one

    Hello,


    In my current Query I return two columns Desc_ and Desc2, this is where the description falls onto two lines. When I put these into excel I insert a new column and put in the following formula
    =[desc_]&" "&[desc2]
    Which then gives me one full description, then I hide the original two columns

    My question is; is there a way to do this within the query so as to make the output a bit neater?

    Any help would be much appreciated

    Cheers,

    Kenny

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: SQL - Join two columns into one

    Use

    [desc_]+[desc2]

    in the SQL

  3. #3
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: SQL - Join two columns into one

    cheers bob, is there a way of putting a space inbetween?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: SQL - Join two columns into one

    it's the same syntax as the excel function
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: SQL - Join two columns into one

    Yes

    [desc_]+" "+[desc2]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1