Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 The purpose of plus signs in a query
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

6 Posts

Posted - 03/11/2013 :  10:04:02  Show Profile  Reply with Quote

I had a pervious topic, but felt it may be necessary to post as a separate topic.

If there are plus signs within a query, what are their purpose?

For instance...

WHERE ','+REPLACE(@TC,' ','')+',' LIKE '%,'+TransCode+',%'

What is it that the + are doing in this query? I understand they're needed, but for what reason?


Most Valuable Yak

15732 Posts

Posted - 03/11/2013 :  10:34:59  Show Profile  Visit robvolk's Homepage  Reply with Quote
They concatenate (combine) strings:
SELECT 'A', 'B', 'AB', 'A' + 'B'
SQL Server uses + to concatenate strings; Oracle, DB2, and the ISO standard use || to concatenate.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000