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: Today @ 9:16 PM
Points: 6,544, Visits: 8,760
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 @ 9:46 AM
Points: 3,150, Visits: 1,900
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: Today @ 3:31 PM
Points: 4,244, Visits: 3,321
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 @ 7:29 AM
Points: 12,206, Visits: 9,168
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, March 17, 2014 7:22 AM
Points: 228, Visits: 211
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