I am new to this and I am trying to learn more about SQL. I have this example and still not able to figure it out why I am getting this error:
DECLARE @xmlprice XML = '<price>1234567</price>'
DECLARE @price DECIMAL(19,4);
SET @price = @xmlprice.value('sum(price)', 'DECIMAL(19,4)');
I get the following error:
Error converting data type nvarchar to numeric.