August 1, 2011 at 9:23 pm
How can I tell if an XML input argument to a stored proc is actually empty?
TIA,
Barkingdog
August 2, 2011 at 2:05 am
How do you define "empty"?
XML variable
a) is NULL
b) is an empty string
c) contains nodes without elements
d) contains nodes with :nil values
August 2, 2011 at 2:12 am
See if this helps
DECLARE @x XML
SET @x=NULL
SELECT @x.exist('/*')
SET @x=''
SELECT @x.exist('/*')
SET @x='<Root/>'
SELECT @x.exist('/*')
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537August 2, 2011 at 7:05 am
Thank you Mark.... good ideas... let me toy with them.
Barkingdog
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply