我一直在努力工作的查询终于有效了。我一直在努力将其纳入SSRS报告。但是,当尝试将查询粘贴到数据集时,我收到以下错误:
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.
现在Arithabort已在数据库中设置为on。我很有信心。 ssrs不能使用arithabort吗?
这是我的问题:
SELECT DISTINCT WORK_ORDER.PART_ID, OPERATION.SEQUENCE_NO, OPERATION.RESOURCE_ID, OPERATION.SETUP_HRS, OPERATION.RUN_HRS,
OPERATION.OPERATION_TYPE, OPERATION.RUN AS PCS_HR, REPLACE(CONVERT(VARCHAR(150), CONVERT(BINARY(150), OPERATION_BINARY.BITS)), CHAR(0), '')
AS Specs_OPR, OPERATION.WORKORDER_BASE_ID, OPERATION.WORKORDER_LOT_ID, OPERATION.WORKORDER_SPLIT_ID,
OPERATION.WORKORDER_SUB_ID, OPERATION.LOAD_SIZE_QTY, OPERATION.CALC_START_QTY, OPERATION.COMPLETED_QTY,
(CEILING(OPERATION.CALC_START_QTY / OPERATION.LOAD_SIZE_QTY)) AS NUM_O_LOADS, ((OPERATION.CALC_START_QTY-OPERATION.COMPLETED_QTY)/OPERATION.LOAD_SIZE_QTY) AS LOADS_REMAINING,
(SELECT DISTINCT descriptions = STUFF((
SELECT ', ' + CHAR(13) + PART.DESCRIPTION FROM dbo.PART JOIN REQUIREMENT ON PART.ID = REQUIREMENT.PART_ID
WHERE REQUIREMENT.WORKORDER_BASE_ID = '026877' AND REQUIREMENT.OPERATION_SEQ_NO = OPERATION.SEQUENCE_NO
FOR XML PATH(''), TYPE).value('.[1]', 'nvarchar(max)'), 1, 2, '')
FROM (REQUIREMENT R JOIN PART P ON R.PART_ID = P.ID)) AS PART_DESCRIPTION
FROM OPERATION
INNER JOIN WORK_ORDER
ON OPERATION.WORKORDER_TYPE = WORK_ORDER.TYPE AND OPERATION.WORKORDER_BASE_ID = WORK_ORDER.BASE_ID AND
OPERATION.WORKORDER_LOT_ID = WORK_ORDER.LOT_ID AND OPERATION.WORKORDER_SPLIT_ID = WORK_ORDER.SPLIT_ID AND
OPERATION.WORKORDER_SUB_ID = WORK_ORDER.SUB_ID
INNER JOIN OPERATION_BINARY
ON OPERATION.WORKORDER_TYPE = OPERATION_BINARY.WORKORDER_TYPE AND
OPERATION.WORKORDER_BASE_ID = OPERATION_BINARY.WORKORDER_BASE_ID AND
OPERATION.WORKORDER_LOT_ID = OPERATION_BINARY.WORKORDER_LOT_ID AND
OPERATION.WORKORDER_SPLIT_ID = OPERATION_BINARY.WORKORDER_SPLIT_ID AND
OPERATION.WORKORDER_SUB_ID = OPERATION_BINARY.WORKORDER_SUB_ID AND
OPERATION.SEQUENCE_NO = OPERATION_BINARY.SEQUENCE_NO
JOIN REQUIREMENT
ON REQUIREMENT.WORKORDER_BASE_ID = OPERATION.WORKORDER_BASE_ID
WHERE (REPLACE(CONVERT(VARCHAR(8000), CONVERT(BINARY(8000), OPERATION_BINARY.BITS)), CHAR(0), '')
NOT LIKE '%Gupta%') AND OPERATION.WORKORDER_BASE_ID = '026877' AND WORK_ORDER.BASE_ID = '026877'
答案 0 :(得分:0)
我找到的答案是:右键单击数据库单击属性>选项>杂项然后将算术中止设置从false更改为true。