Home
Analytics
SQL statement does not return a ResultSet object
thulanin
<p>Hi</p><p> </p><p>I am trying to create a report and I am finding it hard to get it working, this is the error I get after i enter my parameters.</p><p> </p><div>Table (id = 9):</div><div><span>+ </span>Cannot execute the statement.
SQL statement does not return a ResultSet object.
SQL error #1: The value is not set for the parameter number 1.</div><div> </div><div>Regards</div><div>Thulani</div>
Find more posts tagged with
Comments
GLO_FR
<p>Hi,</p><p> </p><p>it looks like an error in your query.</p><p>Can you upload your report or copy your query.</p>
huddythedaddy
Sorry to hack your post but I am also having an issue creating report parameters. My query has 3 inner joins and I'm trying to use a wildcard % to filter results using 'and partid (column name) like ?
I have created several reports over the past few weeks and never ran into this before so I'm a little out of my depth. Could you help me if I was to send you the sql query? Thanks.
GLO_FR
Hi,
Yes query or report. As you want. I'll take a look on it
huddythedaddy
select goodsreceiptitems.orderid, goodsreceiptitems.partid,
goodsreceiptitems.partdescription, goodsreceipts.traderid,
allsuppliers.name, goodsreceiptitems.shipmentid,
goodsreceiptitems.traderquantityadvised, goodsreceiptitems.traderquantity,
goodsreceiptitems.traderuom, purchaseorderitems.unitprice,
purchaseorderitems.nettprice, goodsreceiptitems.createdby,
goodsreceiptitems.createddate, goodsreceiptitems.modifiedby,
goodsreceiptitems.modifieddate, goodsreceiptitems.statusfrom goodsreceiptitems
inner join goodsreceipts on goodsreceiptitems.shipmentid = goodsreceipts.id
inner join allsuppliers on goodsreceipts.traderid = allsuppliers.supplier
inner join purchaseorderitems on goodsreceiptitems.orderid = purchaseorderitems.orderid
order by orderid ASC
eport and thanks. Here goes....
huddythedaddy
This works in studio and in birt as a preview however when I create a rp param and edit the data set 'and partid like ?' I get a error saying ambigous partid or something along those lines. Am I just putting the and partid like in the wrong place or something? Thanks
GLO_FR
Query looks fine.
When you run it in a SQL client, did it work?
I don't see the parameters where are there?
Do you have some computed columns?
huddythedaddy
The query ran fine in sql studio yes. Sorry I don't have all the info with me regs parameters but I can run through what I have done.
having connected the source and data set I made a table, draggin in columns and labelled the headers at this point all was lookimg good. I then decided I would set some report parameters so that people could filter the report. Created a new param giving it a name, type as string and default value as %.
Then into data set, added where partid like ? THEN when this didn't work I tried... and partid like ? after doing this I linked the data set to the parameter i created first and clicked preview result and get an error. I could send the error/code if that would help? Or am I missing a step out or something when I'm setting up a parameter. I'm new to this
huddythedaddy
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.1.v20100915
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: Ambiguous column name 'partid'.
;
java.sql.SQLException: Ambiguous column name 'partid'
wwilliams
<p>"ambigous partid" means you have two or more tables with partid, you need tablename.partid like...</p>
huddythedaddy
<blockquote class="ipsBlockquote" data-author="wwilliams" data-cid="128850" data-time="1403634956" data-date="Today, 07:35 PM"><p>"ambigous partid" means you have two or more tables with partid, you need tablename.partid like...</p></blockquote>
ok thanks very much I'll give it a whirl.