on-internet
← Community

Why are the data types xml and varchar are incompatible in the add operator

Stack Overflow ·

I'm trying to display a column name as well as the data from that column, but can't because of the following error: Msg 402, Level 16, State 1, Line 5 The data types xml and varchar are incompatible in the add operator. Convert or Cast don't work in this instance. Code: select CUSTOMER_ID, CURRENCY, DELIVERY_METHOD, CASE WHEN (COURIER_TRACKING_XML) IS NOT NULL THEN dbo.GetXml(COURIER_TRACKING_XML) + 'Courier' END, CASE WHEN BILLING_ADDRESS IS NOT NULL THEN dbo.GetXml(BILLING_ADDRESS) + 'Billing' END, CASE WHEN DELIVERY_ADDRESS IS NOT NULL THEN dbo.GetXml(DELIVERY_ADDRESS) + 'Delivery' END from

Comments

Sign in or sign up to comment and upvote.

No comments yet.