March 15, 2023 at 12:00 am
Comments posted to this topic are about the item Decoding Set Options
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
March 15, 2023 at 10:13 am
I get it right, but I admit that the question is a little confusing: the value of 4 is the 3rd bit (starting from position ZERO, 2 is the right one). So, I understood you want to decod ANSI_WARNINGS that is GET_BIT(@@OPTION,3).
March 15, 2023 at 1:07 pm
Yeah, I have to admit this one was a little confusing. According to the documentation "Value 4" on the user options table is referring to CURSON_CLOSE_ON_COMMIT. If you take it as the @@OPTIONS variable returns 4 (which is decimal) then you still end up with 0100 in binary which still indicates that value 4 of the user options table is set (CURSON_CLOSE_ON_COMMIT). If you ignore that and only read it as "How do you determine if SET ANSI_WARNINGS is enabled/disabled?"; then it makes more sense. At least to me...
March 15, 2023 at 9:52 pm
They do it in a lot of languages... I hate it when people number the bits differently than the exponent of "2". 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
March 20, 2023 at 4:00 pm
The whole 0 or 1 based thing seems incredibly annoying to me. Someone should have just stated everything is 0-based early on and demanded all languages stick to this.
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
March 20, 2023 at 4:45 pm
+1000
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply