I need something like this:
select (len(someLongTextColumn)=0) as isEmpty;
The above doesn\'t work,
any alternatives?
If you cast to bit, then most client code can read it as boolean directly (SQL Server doesn't have a boolean type)
SELECT
CAST(
CASE
WHEN len(someLongTextColumn) = 0 THEN 1 ELSE 0
END AS bit
) as isEmpty;
if you have many in one go, use bit variables like this: Imply bit with constant 1 or 0 in SQL Server