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: Wednesday, September 17, 2014 8:11 PM
Points: 5,356, Visits: 8,910
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: 2 days ago @ 10:57 AM
Points: 3,323, Visits: 1,988
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: Monday, September 15, 2014 11:54 AM
Points: 4,107, Visits: 3,423
Thanks for an easy one, Wayne!
Post #1345487
Posted Wednesday, August 15, 2012 11:21 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:29 AM
Points: 12,945, Visits: 10,716
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: Tuesday, September 16, 2014 8:11 AM
Points: 270, Visits: 236
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