October 8, 2008 at 12:28 pm
declare @CrossSell XML
update dbo.ProductBase
set CrossSell.modify('insert into (/CrossSell)[4a321938-c189-453c-9e8d-850a2885453f]')
where CrossSell = @CrossSell
i am getting the error The xml data type cannot be compared or sorted, except when using the IS NULL operator.
pls help
October 8, 2008 at 12:35 pm
Well, the error means exactly what it says...you can't compare the XML data type like that. I see that you declare the XML variable, but never assign it a value, what are you trying to do? Are you checking for NULL, or did you not post all of the code?
October 8, 2008 at 1:02 pm
Please don't cross post.
Continue discussion HERE:
http://www.sqlservercentral.com/Forums/Topic582804-149-1.aspx
October 8, 2008 at 1:12 pm
i have to update CrossSell field of productbase table ,the CrossSell field is a xml data type which contains null value
i inserted values in a different table using clr trigger in visual studio 2008,and i changed inserted value to sting using xml writer ,now i need to update the productbase table's CrossSell field using that value when iam trying to do that by this query
Update dbo.ProductBase
set @CrossSell= ('
')
where CrossSell='Null'
i got an error The data types xml and varchar are incompatible in the equal to operator.
so i tried in different ways ,i am new to xml data type so if u guys have any idea please help
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply