Home > DeveloperSection > Forums > How do I check if a SQL Server text column is empty?
Manoj Bhatt
Manoj Bhatt

Total Post:153

Posted on    February-14-2013 1:17 AM

 MSSQL Server MSSQL Server 

 1 Reply(s)
 1869  View(s)
Rate this:

Hi MindStickians!

I am using SQL Server 2005. I have a table with a text column and I have many rows in the table where the value of this column is not null, but it is empty.

Trying to compare against '' yields this response:

The data types text and varchar are incompatible in the not equal to operator.

Is there a special function to determine whether the value of a text column is not null but empty?



Total Post:604

Posted on    February-16-2013 3:43 AM

Hi Manoj!

For check empty value try this "where" clause

where datalength(mytextfield)=0

Don't want to miss updates? Please click the below button!

Follow MindStick