SELECT cast( (1 > 2) as bit) ??? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SELECT cast( (1 > 2) as bit) ???

Using MS SQL, does anyone know of a way to evaluate two values to arrive at a bit (boolean) value? I’m looking to do something like this: select cast((G.Total < G.Average) as bit) as BelowAverage from G Thanks
Use the case statement to evaluate the condition and return the output in bit. Thanks, Name
Dilli Grg (1 row(s) affected)
Ahh… thanks! I got it figured.