February 17, 2018 at 12:26 pm
Heh... although it certainly does return a single integer (which is the answer I chose based on a coin flip between A and C), answer C is actually much more correct. While an integer is certainly returned, that integer is a single element result set that identifies all of the SET options currently enabled for me as a user. Just because it needs a little more work to figure out what the integer represents doesn't actually diminish the fact that it's a result set of 1 element that contains information as to all of the SET options that I have On or Off.
And the explanation of the answer is technically incorrect, as well. It states...
@@OPTIONS returns a binary value that represents a bitmap of your SET options
It patently is NOT a binary value. It IS an integer value that represents a bitmap. 😉
Still, great question. I've never used @@OPTION before.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 19, 2018 at 2:57 am
Nice question, thanks Steve
Agree with Jeff regarding the explanation, though...
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
February 19, 2018 at 2:09 pm
One of those days when I know the right answer and click on the wrong answer. I guess that makes up for the times when I click on the right answer for the wrong reason.
February 19, 2018 at 3:12 pm
Well I had to guess as well but somehow I got it right. Thanks, Steve!
February 20, 2018 at 6:09 am
Apologies for the explanation. That is updated.
For the result set answer, expanded to note the answer is a multi-line result set.
Technically, @@options returns an integer. You can get this with PRINT. If you use SELECT, you're choosing to cast the integer into a result set.
February 20, 2018 at 7:11 am
Steve Jones - SSC Editor - Tuesday, February 20, 2018 6:09 AMApologies for the explanation. That is updated.
For the result set answer, expanded to note the answer is a multi-line result set.Technically, @@options returns an integer. You can get this with PRINT. If you use SELECT, you're choosing to cast the integer into a result set.
Awesome and perfect! Thanks, Steve!
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply