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»»»

TSQL Expand / Collapse
Author
Message
Posted Saturday, April 3, 2010 11:06 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, June 21, 2010 12:30 AM
Points: 798, Visits: 87
Comments posted to this topic are about the item TSQL
Post #896284
Posted Saturday, April 3, 2010 11:10 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Monday, August 25, 2014 6:32 PM
Points: 11,194, Visits: 11,140
Good question today - a nice variation on the convert-to-BIT questions of the past. I will freely admit to guessing on this one!



Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #896285
Posted Saturday, April 3, 2010 5:21 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 6:02 PM
Points: 2,818, Visits: 2,560
It is learning about things like this....one little BIT at a time that make me better and better. Thanks.
Post #896341
Posted Saturday, April 3, 2010 5:53 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 8:24 AM
Points: 2,351, Visits: 2,700
dbowlin (4/3/2010)
It is learning about things like this....one little BIT at a time that make me better and better. Thanks.


Ha ha - good one!


-------------------
"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Post #896344
Posted Saturday, April 3, 2010 10:36 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
Simple and easy one.

SQL DBA.
Post #896351
Posted Saturday, April 3, 2010 10:40 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, November 12, 2013 10:53 PM
Points: 290, Visits: 714
Easy but brushing up the knowledge

Thanks


John
Post #896352
Posted Sunday, April 4, 2010 10:09 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, July 21, 2014 3:43 AM
Points: 1,938, Visits: 1,162
Good QOD.This Question gives good information about bit datatypes.
when we use space or all zero it bit will convert it into zero.If we give numeric(numbers) it will convert it into one.

declare @bit bit
set @bit='233677788778'
select @bit

This gives 1 as output.

declare @bit bit
set @bit='00000'
select @bit


This gives 1 as output.


declare @bit bit
set @bit=' '
select @bit


This gives 0 as output.



Malleswarareddy
I.T.Analyst
MCITP(70-451)
Post #896521
Posted Monday, April 5, 2010 1:38 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: Friday, May 9, 2014 12:47 AM
Points: 3,448, Visits: 4,407
malleswarareddy_m (4/4/2010)
declare @bit bit
set @bit='00000'
select @bit

This gives 1 as output.

This must be a typo because the result is 0.
Post #896572
Posted Monday, April 5, 2010 5:49 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: Thursday, July 17, 2014 10:56 AM
Points: 3,924, Visits: 1,607
malleswarareddy_m (4/4/2010)
Good QOD.This Question gives good information about bit datatypes.
when we use space or all zero it bit will convert it into zero.If we give numeric(numbers) it will convert it into one.




Go through the discussion over this thread to get more info about bit.

http://www.sqlservercentral.com/Forums/Topic854871-2605-1.aspx


SQL DBA.
Post #896621
Posted Monday, April 5, 2010 8:45 AM


SSC-Insane

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

Group: General Forum Members
Last Login: Yesterday @ 8:01 PM
Points: 21,642, Visits: 15,312
Nice 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 #896751
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse