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 «««1234

BIT Conversions Expand / Collapse
Author
Message
Posted Tuesday, August 14, 2012 1:50 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, August 22, 2014 8:50 PM
Points: 6,594, Visits: 8,877
buntyteg (8/14/2012)
in correct answer -1,1 is correct

but how 25 is correct

means to say... in bit datatype how we can store 25 (2 digit) value

??????


If it helps, think of it this way:
DECLARE @BitValue BIT;
SET @BitValue = CASE WHEN ValueToConvert = 0 THEN 0 ELSE 1 END;



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 #1345005
Posted Wednesday, August 15, 2012 7:02 AM


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: Today @ 4:33 PM
Points: 3,293, Visits: 1,977
Nice question. Made me pause for a moment. Thanks!
Post #1345244
Posted Wednesday, August 15, 2012 12:57 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Friday, August 22, 2014 8:50 AM
Points: 4,425, Visits: 3,417
Thanks for an easy one, Wayne!
Post #1345487
Posted Wednesday, August 15, 2012 11:21 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:57 PM
Points: 13,606, Visits: 10,490
Great question, thanks.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1345666
Posted Tuesday, January 29, 2013 6:32 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, August 18, 2014 3:26 AM
Points: 262, Visits: 232
good questions......






manik123
**********


Manik
You cannot get to the top by sitting on your bottom.
Post #1413000
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse