August 29, 2008 at 1:47 pm
Hugo Kornelis (8/29/2008)
If you still want to implement this and put it in production, feel free to do so ... but never forget that it IS undocumented, so you'll have to retest after every service pack, every patch, and every hardware update and still be prepared to be surprised. The fact that many users do use this and do rely on this does not guarantee that Microsoft won't change it - just remember what happened to GROUP BY without ORDER BY when upgrading from SQL 6.5 to SQL 7.0, or to views with TOP 100 PERCENT and ORDER BY when upgrading to SQL 2000 to SQL 2005. For my production code, I'll stick to officially documented code. 🙂
Ok, Hugo, I get what you are saying about officially documented code. That is a good rule to follow.
August 30, 2008 at 7:09 am
September 2, 2008 at 11:56 am
Well, I am confused.
Whatever happened to the concept that you cannot assign a result set to a scalar -- Should this not be barfed out at compile time in the first place ? I certainly would prefer
it be so, in case I make an error while coding something like this, rather than have this bizarre and not necessarily predictable behavior.
If I remember previous versions, it used to be that way.
But even when doing this for a string instead of an integer, it still results in a long string which concatenates all of the values.
Regards
November 26, 2008 at 8:44 am
I reckon it's a good example of bad practice just because the outcome isn't defined 🙂
November 26, 2008 at 9:17 am
(with apology)
and i reckon, good programming skills are needed to understand this code.
Tariq
master your setup, master yourself.
http://mssqlsolutions.blogspot.com
November 26, 2008 at 10:09 am
I take your point about it being good exercise for the mind - quite so. But in the real world, if you rely on the database behaving in a particular way when that behaviour is not defined, aren't you asking for trouble? I wouldn't want code like that in a database I'm responsible for!
After all, for each new release MS will test that the database conforms to their definition of correct (hopefully from the documentation, or at least the same source as the documentation)!), not the way it used to work.
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply