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)
Set rowFetchLimit
fredbeneti
Hi,
in Data Set > Settings, I can check "Fetch all rows from data source" or set a number in "Max number of rows to fetch from data source", but I need to set this with a parameter. Sometimes I need to get 10 rows, sometimes 100 (for example). How can I set this property by a simple parameter? This property is in xml source as rowFetchLimit. I try to set this, but I get no luck.
Thanks
Find more posts tagged with
Comments
mwilliams
Hi fredbeneti,
You could limit the number of rows you fetch in your SQL for your dataSet. This would allow you to use your parameter in your query to limit this value.
fredbeneti
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72771" data-time="1296493228" data-date="31 January 2011 - 10:00 AM"><p>
Hi fredbeneti,<br />
<br />
You could limit the number of rows you fetch in your SQL for your dataSet. This would allow you to use your parameter in your query to limit this value.<br /></p></blockquote>
<br />
Hi,<br />
<br />
but how can I do that? Am I so blind and I'm not seeing this option? I tried to use the 'limit' but JDBC raise a error..<br />
<br />
example:<br />
<br />
select field1, field2 from sometable limit 10<br />
or<br />
select field1, field2 from sometable limit ?<br />
<br />
Thanks
mwilliams
What is your database type? Oracle, MySQL, etc?
mwilliams
There are different ways for each database type. For example, this works for the sample database that comes with BIRT:
"select blah from blah fetch first 10 rows only"
fredbeneti
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72781" data-time="1296503893" data-date="31 January 2011 - 12:58 PM"><p>
There are different ways for each database type. For example, this works for the sample database that comes with BIRT:<br />
<br />
"select blah from blah fetch first 10 rows only"<br /></p></blockquote>
<br />
Well... I really don't know what happen, but today (after boot) the limit is working! Eclipse is kidding me... <br />
<br />
In my case, I'm using postgree. so, my query is:<br />
<br />
select bla from ble limit ?, and I put some integer parameter.<br />
<br />
Thanks
mwilliams
Hmm. Not sure what happened there, but glad it's working now. Let us know whenever you have questions and we'll try to help!