|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 3:02 PM
Points: 2,768,
Visits: 108
|
|
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.
)
|
|
|
|
|
Mr 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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 3:02 PM
Points: 2,768,
Visits: 108
|
|
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!)
)
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 1:06 AM
Points: 2,525,
Visits: 3,618
|
|
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
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 1:35 AM
Points: 4,787,
Visits: 1,336
|
|
Another goodie...............:)
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 9:09 AM
Points: 3,550,
Visits: 922
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 3:02 PM
Points: 2,768,
Visits: 108
|
|
Thank you, Anirban and David.
)
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 1:35 AM
Points: 4,787,
Visits: 1,336
|
|
Dr. Diana Dee (5/8/2008)
Thank you, Anirban and David. ) 
You are welcome........:)
|
|
|
|
|
SSC 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:)
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Saturday, March 02, 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
|
|
|
|