Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Bit by bit Expand / Collapse
Author
Message
Posted Wednesday, January 27, 2010 8:12 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, May 27, 2010 1:31 PM
Points: 132, Visits: 101
Comments posted to this topic are about the item Bit by bit
Post #854871
Posted Wednesday, January 27, 2010 8:13 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 10:56 AM
Points: 3,924, Visits: 1,607
Easy one.

SQL DBA.
Post #854872
Posted Wednesday, January 27, 2010 8:29 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 2,269, Visits: 3,777
Good question. Tests the basic

Mohammed Moinudheen
Post #854878
Posted Wednesday, January 27, 2010 10:07 PM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, January 11, 2013 12:41 PM
Points: 621, Visits: 297
Points for taking ...



Bhavesh Patel

http://bhaveshgpatel.wordpress.com/
Post #854900
Posted Wednesday, January 27, 2010 10:10 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:09 AM
Points: 6,580, Visits: 8,856
Bhavesh_Patel (1/27/2010)
Points for taking ...

Makes up for yesterdays (though points were awarded anyway...)


Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #854901
Posted Wednesday, January 27, 2010 10:16 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:44 PM
Points: 21,187, Visits: 14,879
Thanks for the question.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #854905
Posted Wednesday, January 27, 2010 11:08 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, June 30, 2014 2:51 AM
Points: 1,967, Visits: 369
easy one
Post #854932
Posted Thursday, January 28, 2010 2:05 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 18, 2014 8:42 AM
Points: 1,706, Visits: 6,230
"if a number larger than one is used, it is converted to one."

I thought the actual explanation was that anything other than 0 (false) is treated as true and hence is stored as 1. So a number larger than 1 becomes 1, but so does any number less than 1, apart from 0.
Post #854994
Posted Thursday, January 28, 2010 2:19 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Yesterday @ 12:18 AM
Points: 608, Visits: 477
OK. I am in the 17% who got it wrong - I replied "Error". And now I know. But will somebody kindly explain why BIT is treated any differently to TINYINT, SMALLINT, INT, etc. It is, after all, only a type that has a range of valid values. If the others report an overflow error when I try to assign values outside their permitted range, why not BIT also?
Post #855002
Posted Thursday, January 28, 2010 2:32 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 18, 2014 8:42 AM
Points: 1,706, Visits: 6,230
Here's a slightly better reference
http://msdn.microsoft.com/en-us/library/ms191530(SQL.90).aspx#_bit

"Converting to bit promotes any nonzero value to 1"
Post #855012
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse