Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Test if xml column is empty

Author  Topic 

olibara
Yak Posting Veteran

94 Posts

Posted - 2011-01-21 : 03:55:03
Hello

I'm trying to find the rows havin an emty or nul xml field
unfortunately where column > '' is nor working
Is there any way to do it ?

Thank for any help

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-01-21 : 05:07:53
Can you post an example table with example data please?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

olibara
Yak Posting Veteran

94 Posts

Posted - 2011-01-21 : 09:36:56
Hello

Here is the way to do it with an Xml Column

where MyCol is not null and (DATALENGTH(MyCol) < 10)
Go to Top of Page
   

- Advertisement -