Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Rafiq
»
TSQL
26 posts, Page 1 of 3
1
2
3
»
»»
TSQL
Rate Topic
Display Mode
Topic Options
Author
Message
Muhammed Rafiq
Muhammed Rafiq
Posted Saturday, April 03, 2010 11:06 AM
Right 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
Paul White
Paul White
Posted Saturday, April 03, 2010 11:10 AM
SSChampion
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 10:33 AM
Points: 10,989,
Visits: 10,529
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
Daniel Bowlin
Daniel Bowlin
Posted Saturday, April 03, 2010 5:21 PM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 11:53 AM
Points: 2,672,
Visits: 2,416
It is learning about things like this....one little BIT at a time that make me better and better. Thanks.
Post #896341
webrunner
webrunner
Posted Saturday, April 03, 2010 5:53 PM
SSCrazy
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 3:05 PM
Points: 2,117,
Visits: 2,209
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!
-------------------
"The chemistry must be respected." - Walter White
"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
SanjayAttray
SanjayAttray
Posted Saturday, April 03, 2010 10:36 PM
Hall of Fame
Group: General Forum Members
Last Login: Friday, March 15, 2013 2:43 PM
Points: 3,924,
Visits: 1,554
Simple and easy one.
SQL DBA.
Post #896351
m--S3qU3L
m--S3qU3L
Posted Saturday, April 03, 2010 10:40 PM
SSC Veteran
Group: General Forum Members
Last Login: Monday, November 19, 2012 11:30 PM
Points: 290,
Visits: 713
Easy but brushing up the knowledge
Thanks
John
Post #896352
malleswarareddy_m
malleswarareddy_m
Posted Sunday, April 04, 2010 10:09 PM
SSCommitted
Group: General Forum Members
Last Login: Yesterday @ 3:21 AM
Points: 1,843,
Visits: 971
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
vk-kirov
vk-kirov
Posted Monday, April 05, 2010 1:38 AM
Hall of Fame
Group: General Forum Members
Last Login: Yesterday @ 1:32 AM
Points: 3,187,
Visits: 4,140
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
SanjayAttray
SanjayAttray
Posted Monday, April 05, 2010 5:49 AM
Hall of Fame
Group: General Forum Members
Last Login: Friday, March 15, 2013 2:43 PM
Points: 3,924,
Visits: 1,554
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
SQLRNNR
SQLRNNR
Posted Monday, April 05, 2010 8:45 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:46 PM
Points: 18,732,
Visits: 12,329
Nice question.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
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 »
26 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.