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)
dynamic dataset parameter binding - possible?
badhorse
We have lot's of sql queries that take "in lists" ie: "where x in (a,b,c)", where the number of items in the list varies and is a String parameter to the report and where we dynamically construct the queryText with string concatenation. Apparently this is less efficient for the database than a prepared statement with a known number of bound parameters due to the parsing involved (this is what I'm told anyway).
Given that we can parse the report parameter to determine how many items are in the list, and given that we can dynamically change the queryText and replace the ("+params["list"]+") with the appropriate # of parameter placeholders (?,?,?), is it possible to dynamically prepare and bind the parameters to the query?
Thanks in advance.
J
Find more posts tagged with
Comments
badhorse
btw, nice related article by Scott at <a class='bbc_url' href='
http://birtworld.blogspot.com/2009/03/birt-multi-select-statements.html'>BIRT
World: BIRT Multi-Select Statements</a>. But it sadly doesn't quite address this.
rpolunsky
I just saw an article that appeared to directly address this the other day and now I can't find it, but I'll try searching again. Unfortunately I've cleared my browser history in the meantime.
rpolunsky
It's in DevShare titled:<br />
Dynamic Binding of IN (LIST) Parameters<br />
by jsherriff<br />
<br />
and I found it at the URL:<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/832-dynamic-binding-of-in-list-parameters/#description'>Dynamic
Binding of IN (LIST) Parameters - Designs & Code - BIRT Exchange</a><br />
<br />
It looks like it's the kind of approach you're asking about.