Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
CannotGetResultSetMetaData
ToK
Hi there,
when I'm using sub queries like:
select cc.id, (select name from mykey ck where id = cc.mykeyid) as MyName
from myval cc where myvalkeyid = '52'
which runs proper in any other tool (Query Analyser, Excel, PHP, ACTUATE) I'm receiving an error message in BIRT:
cut
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.6.2.r262_v20110215
Error Code:odaconsumer.CannotGetResultSetMetaData
Error Message:Cannot get the result set metadata.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:Incorrect syntax near ')'.;
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.
cut
Without sub select, it works. Any hints how to sort that problem out?
Thanks in advance!
ToK
Find more posts tagged with
Comments
Hans_vd
I'm not entirely sure about the reason behind this, but I think it has something to do with BIRT not being able to get the datatype of the name column.<br />
<br />
Also, this is not the standard way of writing such a query. Try this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
select cc.id,
ck.name as MyName
from myval cc, mykey ck
where ck.id = cc.mykeyid
and myvalkeyid = '52'
</pre>
<br />
You might need an outer join instead of an inner join if your result has less rows than you expect.<br />
<br />
Regards<br />
Hans
ToK
Thanks Hans, <br />
I have some quite big and complex queries, written in "this" style to migrate into BIRT. I would appreciate<br />
a solution which prevents the rewriting of those queries. I thought on a possibility of manual mapping.<br />
<br />
ACTUATE designer doesn't have problems with this query style.<br />
<br />
br, Toralf<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'Hans_vd'" data-cid="77828" data-time="1306935935" data-date="01 June 2011 - 06:45 AM"><p>
I'm not entirely sure about the reason behind this, but I think it has something to do with BIRT not being able to get the datatype of the name column.<br />
<br />
Also, this is not the standard way of writing such a query. Try this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
select cc.id,
ck.name as MyName
from myval cc, mykey ck
where ck.id = cc.mykeyid
and myvalkeyid = '52'
</pre>
<br />
You might need an outer join instead of an inner join if your result has less rows than you expect.<br />
<br />
Regards<br />
Hans<br /></p></blockquote>
ToK
<blockquote class='ipsBlockquote' data-author="'tok'" data-cid="77817" data-time="1306927979" data-date="01 June 2011 - 04:32 AM"><p>
Hi there,<br />
when I'm using sub queries like:<br />
<br />
select cc.id, (select name from mykey ck where id = cc.mykeyid) as MyName <br />
from myval cc where myvalkeyid = '52'<br />
<br />
which runs proper in any other tool (Query Analyser, Excel, PHP, ACTUATE) I'm receiving an error message in BIRT:<br />
<br />
cut
<br />
A BIRT exception occurred.<br />
Plug-in Provider:Eclipse.org<br />
Plug-in Name:BIRT Data Engine<br />
Plug-in ID:org.eclipse.birt.data<br />
Version:2.6.2.r262_v20110215<br />
Error Code:odaconsumer.CannotGetResultSetMetaData<br />
Error Message: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:Incorrect syntax near ')'.;<br />
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.<br />
cut
<br />
<br />
Without sub select, it works. Any hints how to sort that problem out?<br />
<br />
Thanks in advance!<br />
<br />
ToK<br /></p></blockquote>
ToK
Hi,
I'v got a solution with using net.sourceforge.jtds.jdbc.Driver (JTDS 1.2 v1.2)
br,
ToK