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

Bit data Expand / Collapse
Author
Message
Posted Wednesday, May 7, 2008 9:03 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: Monday, June 16, 2014 7:47 PM
Points: 3,143, Visits: 136
Thank you.

I myself have trouble noticing everything in the questions! (LOL)

I did give an AdventureWorks example so people could actually test for the result.

)
Post #496418
Posted Wednesday, May 7, 2008 11:12 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, December 14, 2010 3:35 PM
Points: 509, Visits: 96
Good Question Dr.Dee! I guess writing our queries like SalariedFlag = 'TRUE' makes it more readable. But I wonder if there would be any performance degrade when we use 'TRUE' instead of 1?

KK
Post #496540
Posted Wednesday, May 7, 2008 11: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: Monday, June 16, 2014 7:47 PM
Points: 3,143, Visits: 136
I suppose one could test whether the implicit conversion has a cost by creating a table with several million rows and running the query each way.

Unfortunately, I'm too busy (translation: I don't care enough!)

)
Post #496555
Posted Wednesday, May 7, 2008 2:44 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 12:47 AM
Points: 2,840, Visits: 3,872
Good Question!

Although I doubt that this new implicit conversion is an improvement for SQL Server.

I would be interested to know why they have not allowed TRUE or FALSE as bool keywords so far.
Does anyone know if this is a technical restriction?

(But at least they (TRUE and FALSE) have been reserved as "FUTURE KEYWORDS")


Best Regards,
Chris Büttner
Post #496700
Posted Thursday, May 8, 2008 1:06 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 5:09 AM
Points: 5,338, Visits: 1,385
Another goodie...............:)


Post #496898
Posted Thursday, May 8, 2008 7:40 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: Yesterday @ 7:43 AM
Points: 3,996, Visits: 1,171
A good question.
Post #497102
Posted Thursday, May 8, 2008 7:59 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: Monday, June 16, 2014 7:47 PM
Points: 3,143, Visits: 136
Thank you, Anirban and David.

)
Post #497118
Posted Thursday, May 8, 2008 9:39 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 5:09 AM
Points: 5,338, Visits: 1,385
Dr. Diana Dee (5/8/2008)
Thank you, Anirban and David.

)


You are welcome........:)



Post #497206
Posted Friday, May 9, 2008 7:02 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, October 12, 2010 5:56 AM
Points: 79, Visits: 45
This was a very good question. I did not know that 'true' and 'false' can not be used with bit columns in SQL 2005. I can now stop having to write DECLARE @TRUE BIT SET @TRUE = 1 statements in my procedures:)
Post #497830
Posted Sunday, May 11, 2008 9:55 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, March 2, 2013 12:48 AM
Points: 4, Visits: 109
sql 2000 with error
Msg 245, Level 16, State 1, Line 1
Syntax error converting the varchar value 'true' to a column of data type bit.
sql 2005 without error
Post #498531
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse