0

I have a stored procedure in which I need to have a where clause that reads something like:

where XMLDataPoint <> NULL  

However, XMLDataPoint is an XML column and I get an error

"The XML data type cannot be compared or sorted, except when using the IS NULL operator."

How should I structure my where clause?

1 Answer 1

3

NULL requires using IS or IS NOT comparisons:

WHERE XMLDataPoint IS NOT NULL

NULL is a state (of having an unknown or undetermined value), not a value itself, so equivalence operators don't apply.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.