Hy guys,
It is possible to create a dynamic dataSet into a method as : <method name="beforeOpen"><![CDATA[ MyQuery ]]></method> based on the outcome of "MyQuery"?
This dynamic dataSet I want to use it then in a JoinDataSet with other dataSet.
Thanks,
Page 1 of 1
How to create a dynamic dataSet How to create a dynamic dataSet
#2
Posted 14 June 2012 - 06:02 AM
Hello,
why do you want to call a dynamic dataset ? Can't you filter all your necessary information from the start. It should be the database who do all the work for you. No scripting needed.
Maybe your datasets will be more complex, but it will be faster and easier to maintain.
select * from (select case when :param1 = '1' then
(select stragg(x) from (select 1 x from dual union select 2 from dual))
when :param1 = '2' then
(select stragg(x) from (select 2 x from dual union select 3 from dual))
else
(select stragg(x) from (select 3 x from dual union select 4 from dual))
end dyn_select
from dual);
Leinad
why do you want to call a dynamic dataset ? Can't you filter all your necessary information from the start. It should be the database who do all the work for you. No scripting needed.
Maybe your datasets will be more complex, but it will be faster and easier to maintain.
select * from (select case when :param1 = '1' then
(select stragg(x) from (select 1 x from dual union select 2 from dual))
when :param1 = '2' then
(select stragg(x) from (select 2 x from dual union select 3 from dual))
else
(select stragg(x) from (select 3 x from dual union select 4 from dual))
end dyn_select
from dual);
Leinad
Page 1 of 1





MultiQuote
