Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problem with SQL message: ARITHABORT
birtprofi
Hi guys I need your help. If I run the SQL Script below I get the following error within BIRT Report Designer:<br />
<br />
<br />
<blockquote class='ipsBlockquote' ><p>Caused by: org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot get the result set metadata.<br />
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.<br />
SQL error #1: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.<br />
;<br />
com.microsoft.sqlserver.jdbc.SQLServerException: 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.<br />
)</p></blockquote>
<br />
But this error-message is only within the BIRT-Designer. I tried to run the SQL Script on MSSQL Server 2008 and there I get no error.<br />
<br />
This is a test-script:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>create table tmp (col1 varchar(100), col2 varchar(100));
insert into tmp values ('1121', 'abc');
insert into tmp values ('1123', 'aee');
insert into tmp values ('1335', 'afg');
insert into tmp values ('1121', 'def');
insert into tmp values ('1121', 'abc');
SELECT
distinct r.col1,
STUFF((SELECT distinct ','+ a.col2
FROM tmp a
WHERE r.col1 = a.col1
FOR XML PATH(''), TYPE).value('.','VARCHAR(max)'), 1, 1, ''),
(select COUNT(*) cnt from tmp a where r.col1 = a.col1) cnt
FROM tmp r</pre>
<br />
If you run this script or something like this in the management console of SQL Server you got this result:<br />
1121 abc,def 3<br />
1123 aee 1<br />
1335 afg 1<br />
<br />
But if you run the same script in the Report Designer in a Dataset you get the error message as shown above. Please give me your advice what I can do.<br />
<br />
Best Regards<br />
Rafael
Find more posts tagged with
Comments
birtprofi
Hi, any idea?
Tubal
Is STUFF a stored procedure?
This may be relevant:
http://stackoverflow.com/questions/1100098/why-do-i-have-to-set-arithabort-on-when-using-xml-in-sql-server-2005
birtprofi
Hi,<br />
<br />
"STUFF" is not a stored procedure, it is a MSSQL-Syntax.<br />
See my first posting:<br />
<blockquote class='ipsBlockquote' ><p>But this error-message is only within the BIRT-Designer. I tried to run the SQL Script on MSSQL Server 2008 and there I get no error</p></blockquote>