January 29, 2013 at 9:48 am
Hugo Kornelis (1/29/2013)
wolfkillj (1/29/2013)
(And yes, I know I spelled DR0P TABLE with a zero instead of an "O". In posting on this forum, I have discovered the my employer seems to have some kind of security filter that blocks outgoing web traffic that includes certain SQL statements. If I spelled DR0P TABLE correctly, that filter would catch this post and return a message that my machine is unable to communicate with the server.)*lol* This sounds like someone read the famous "Bobby Tables" cartoon[/url] - and then completely misunderstood it! *lol*
"Little Bobby Tables" is very well known around here, so I don't think that's the problem. Plus, the filter catches outgoing content. The filter only seems to catch certain T-SQL statements, though. I'll have to ask the sysops or infosec guys about this next time I'm in their end of the building.
Jason Wolfkill
January 29, 2013 at 10:06 am
Thanks for the question. Glad I was right on it.
Also thanks to demonfox and others for the further details into the refresher on the bit data type
January 29, 2013 at 10:53 am
Nice easy question, with a bonus discussion about one-row tables. 🙂
On the second thought, the table in the question allows 0 or 1 rows, while Hugo's example ensures that the table, once the first row is inserted, will always have exactly 1 row.
January 29, 2013 at 7:39 pm
Nice one. I noticed the bit data type, but wasn't even thinking about binary vs decimal. Doh.
And I even told someone today the line I stole from (sorry can't remember at the moment whoit belongs to) someone's sig line: "There are 10 types of people ...." Need more rest. 🙂
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
January 29, 2013 at 9:04 pm
Nice Question..
Thanks..
January 30, 2013 at 1:44 pm
Easy one. And greats Hugo Cornelis's contributions.
January 31, 2013 at 2:52 pm
Nice easy one..
Thanks
February 1, 2013 at 2:58 pm
Great, sneaky question.
😛
Thanks a lot.
February 4, 2013 at 11:34 am
Lokesh Vij (1/28/2013)
Easy question for the day!I agree with the explanation by "demonfox", here is the BOL link for BIT datatype:
http://msdn.microsoft.com/en-us/library/ms177603.aspx
It clearly says "any non-zero value will be converted to 1". I could not find the concept of the number being converted into binary and than getting truncated. Can anyone pour some light on what is happening internally?
+1
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 4, 2013 at 2:21 pm
Good and Easy one
February 11, 2013 at 5:40 pm
Nice question Thomas! I'm seeing more references to SQL check constraints out on the Interwebs than I remember in the past.
Cheers,
Andre Ranieri
February 22, 2013 at 2:19 am
interesting
not useful but interesting
Viewing 12 posts - 31 through 41 (of 41 total)
You must be logged in to reply to this topic. Login to reply