SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

meadow0
Starting Member

USA
6 Posts

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

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?

Thanks!!

robvolk
Most Valuable Yak

USA
15676 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  
 New 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.08 seconds. Powered By: Snitz Forums 2000