SQL Server doesn't have a logical data type. If you're refering to the bit data type than it's a numeric data type in which 1/0 may represent true/false respectivelly. SQL Serve doesn't support convertion of true/false exppression into numeric data type or vise versa. You have to use CASE function to do that.
>In one of my VFP queries, I have an expresion in a SQL Select that evaluates to true/false based on the comparison of a date to today.
>
>(Date() <= device.warrdate) as warranty
>
> What true if the warranty is still active, in otherwords if today is less than the warranty end date.
>
>In switching this SQL statement to pull from SQL Server, I get an syntax error when I convert the statement to:
>
>(Date() <= device.warrdate) as warranty
>
>instead I could only get it to work using an inline condition case statement
>
>CASE WHEN datediff(dd,getdate(), device.warrdate) >= 0 THEN 1 ELSE 0 END
>
>Is it not possible with T-SQL in SQL Server 2005, to have an expression evaluate to true/false (really 1/0)?
--sb--