I think you may have posted in the wrong forum as this is a 2000 forum, but you should try this:
DECLARE @var XML
SET @var = '' -- '<test>test</test>'
SELECT @var.exist('/test')
IF @var IS NOT NULL AND @var.exist('/test') = 1
BEGIN
SELECT 'not null'
END
ELSE
BEGIN
SELECT 'null'
END
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question