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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 The purpose of plus signs in a query

Author  Topic 

meadow0
Starting Member

6 Posts

Posted - 2013-03-11 : 10:04:02
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

15732 Posts

Posted - 2013-03-11 : 10:34:59
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
   

- Advertisement -