Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Inline code SQL 2005

Inline code SQL 2005

Scheduled Pinned Locked Moved Database
databasehelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 9162544
    wrote on last edited by
    #1

    I have table A with col1, col2 & table B with col3, col4. I would like to write a query like select a.* from A join B on A.col1=B.col3 and A.col2 like col4 + '%' Is it possible in SQL 2005? is there a concat function in SQL 2008 or 2005. I have seen it in 2012. Pls help me. Thanks in advance

    J 1 Reply Last reply
    0
    • M Member 9162544

      I have table A with col1, col2 & table B with col3, col4. I would like to write a query like select a.* from A join B on A.col1=B.col3 and A.col2 like col4 + '%' Is it possible in SQL 2005? is there a concat function in SQL 2008 or 2005. I have seen it in 2012. Pls help me. Thanks in advance

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #2

      Anything wrong with google today? Have a look here[^]. String concatenation has been around as long as SQL has. But different dialects have different syntax. Oracle uses '||', Sql Server uses '+', most implementations can use 'concat(string1, string2)' but not SQL Server AFAIK. Could be wrong about that though.

      Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

      A 1 Reply Last reply
      0
      • J Jorgen Andersson

        Anything wrong with google today? Have a look here[^]. String concatenation has been around as long as SQL has. But different dialects have different syntax. Oracle uses '||', Sql Server uses '+', most implementations can use 'concat(string1, string2)' but not SQL Server AFAIK. Could be wrong about that though.

        Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions

        A Offline
        A Offline
        Andrei Straut
        wrote on last edited by
        #3

        Jörgen Andersson wrote:

        Anything wrong with google today?

        Same impression here, I'm starting to believe I'm the only person with Google access today :)

        Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups