Strnge WHERE syntax
-
Has anybody ever seen anything like this in the WHERE clause of an SQL SELECT?
WHERE a.somenumericvalue = + @somenumericvalue
I certainly haven't and I don't know what it does. It's kind of difficult to Google for as well so that's why I'm putting it up here. Anyone got any ideas?
Smokie, this is not 'Nam. This is bowling. There are rules. www.geticeberg.com
-
Has anybody ever seen anything like this in the WHERE clause of an SQL SELECT?
WHERE a.somenumericvalue = + @somenumericvalue
I certainly haven't and I don't know what it does. It's kind of difficult to Google for as well so that's why I'm putting it up here. Anyone got any ideas?
Smokie, this is not 'Nam. This is bowling. There are rules. www.geticeberg.com
Usually the + sign will have braces around it and appear following the field. Or at least that is how I'm familiar with it. It is for doing an open join on table. Or as I like to think, anything matches on NULL. :)
where a.ID_Field = b.ID_Field (+)
All rows from table a will be returned. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
-
Usually the + sign will have braces around it and appear following the field. Or at least that is how I'm familiar with it. It is for doing an open join on table. Or as I like to think, anything matches on NULL. :)
where a.ID_Field = b.ID_Field (+)
All rows from table a will be returned. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
Yes, I've seen that old join syntax before. It's not what's going on here though. Most strange. I can't even see that it's affecting the logic.
Smokie, this is not 'Nam. This is bowling. There are rules. www.geticeberg.com
-
Yes, I've seen that old join syntax before. It's not what's going on here though. Most strange. I can't even see that it's affecting the logic.
Smokie, this is not 'Nam. This is bowling. There are rules. www.geticeberg.com
Would it have anything to do with the bind variable? :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
-
Would it have anything to do with the bind variable? :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
I can't see how. All this code was ripped out of a ginormous Python framework last year; I'm new on the site. It's possible that this is a concatenation that slipped through, and SQL Server doesn't give a compile error, possibly because it's applying a plus to the bind. Or maybe this is a jury-rigged ABS()? I dunno, but it's queer as folk. I'll ask around tomorrow morning...
Smokie, this is not 'Nam. This is bowling. There are rules. www.geticeberg.com
-
Has anybody ever seen anything like this in the WHERE clause of an SQL SELECT?
WHERE a.somenumericvalue = + @somenumericvalue
I certainly haven't and I don't know what it does. It's kind of difficult to Google for as well so that's why I'm putting it up here. Anyone got any ideas?
Smokie, this is not 'Nam. This is bowling. There are rules. www.geticeberg.com