Click here to Skip to main content
       

Database

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionInline code SQL 2005memberMember 916254415-Sep-12 19:52 
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
AnswerRe: Inline code SQL 2005memberJörgen Andersson16-Sep-12 1:15 
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

GeneralRe: Inline code SQL 2005memberAndrei Straut16-Sep-12 23:55 
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 Smile | :)
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.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130617.1 | Last Updated 19 Jun 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid