dongpi9494 2016-06-17 11:02
浏览 21
已采纳

使用MSSQL的ARITHABORT

I am running below query to get comma separated value and this working fine on my environment but when I tried to run this in client environment, I got error 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.

$rolesrequirement = Connection::queryBuilder()
            ->select("max(c.title) as title, STUFF((SELECT ', ' + CAST(rc.roleid AS VARCHAR(10)) [text()]
                     FROM edoc_link_role_competence as rc  
                     WHERE rc.competenceid = c.id 
                     FOR XML PATH(''), TYPE)
                    .value('.','NVARCHAR(MAX)'),1,2,' ') as roleid")
            ->from('edoc_competence', 'c')
            ->leftJoin('c', 'edoc_link_role_competence', 'rc', 'rc.competenceid = c.id')
            ->where('c.installationid = :id')
            ->groupBy('c.id')
            ->setParameter(':id', $iid)->execute()->fetchAll(PDO::FETCH_OBJ);

I am using MSSQL -2010 and on client env its 2008 Can anybody have same experience_?

  • 写回答

1条回答 默认 最新

  • dongshendie8849 2016-06-17 11:16
    关注

    Try setting ARITHABORT ON at server level. Try below link for help.

    https://blogs.msdn.microsoft.com/mikkole/2014/01/02/queries-failing-because-of-the-arithabort-setting/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题