SQL Server错误,设置不正确:'ARITHABORT' [英] SQL Server Error,incorrect settings: 'ARITHABORT'

查看:315
本文介绍了SQL Server错误,设置不正确:'ARITHABORT'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在sql server数据库2008中选择数据throw xml时出现此错误



SELECT失败,因为以下SET选项的设置不正确:'ARITHABORT' 。验证SET选项是否正确用于计算列和/或筛选索引和/或查询通知和/或XML数据类型方法和/或空间索引操作的索引视图和/或索引

< br $> b $ b



我的查询是,

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,

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......

推荐答案

检查 ARITHABORT选项 [ ^ ]。仔细阅读备注部分:将ARITHABORT设置为 OFF会对查询优化产生负面影响,从而导致性能问题。
Check ARITHABORT option[^]. Read carefully Remarks section: "Setting ARITHABORT to OFF can negatively impact query optimization leading to performance issues."


这篇关于SQL Server错误,设置不正确:'ARITHABORT'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆