Click here to Skip to main content
15,885,869 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i am getting this error when i am select data throw xml in sql server database 2008

SELECT failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations



My query is,
SQL
WITH PriceEmailItems as(
    SELECT Split.a.value('.', 'VARCHAR(100)') AS PriceItems FROM
    (SELECT CAST ('<price>' + REPLACE(Left([Items], Len([Items])-1), ',', '</price><price>') + '</price>' AS XML) AS Subcat
     FROM rpriceemail where planenddate>getdate()) AS A CROSS APPLY Subcat.nodes ('/price') AS Split(a))

SELECT DISTINCT(PriceItems), Rmetalcats.Category, RMetalcats.subcat, RMetalcats.Packages, COUNT(PriceItems) as howmany, Country FROM PriceEmailItems
    INNER JOIN RMetalCats on RMetalCats.ID=PriceItems group by PriceItems, Rmetalcats.Category, RMetalcats.subcat,Packages, Country


How can i solve it......
Posted

1 solution

Check ARITHABORT option[^]. Read carefully Remarks section: "Setting ARITHABORT to OFF can negatively impact query optimization leading to performance issues."
 
Share this answer
 
Comments
[no name] 5-Aug-14 3:15am    
k thanks..
Maciej Los 5-Aug-14 16:04pm    
You're welcome. PLease accept my answer as a solution - formally to remove your question from unanswered list.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900