Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: Yesterday @ 1:35 PM
Points: 5,781, Visits: 10,103
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
Author - SQL Server T-SQL Recipes
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: Tuesday, May 3, 2016 4:14 PM
Points: 3,937, Visits: 2,240
Nice question. Made me pause for a moment. Thanks!
Post #1345244
Posted Wednesday, August 15, 2012 12:57 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 2:07 PM
Points: 5,066, Visits: 4,164
Thanks for an easy one, Wayne!
Post #1345487
Posted Wednesday, August 15, 2012 11:21 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: 2 days ago @ 2:06 AM
Points: 15,143, Visits: 13,032
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 SQLKover.

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

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, October 13, 2015 8:18 AM
Points: 344, Visits: 278
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