Aggregator | Books | Industry News | Firefox Plugins | Social | Links

Comments

Dynamic Binds Using Contexts - Simplify dynamic variable binds within dynamic SQL using contexts.



kervoaz said...

excellent
thank you

Charlie 木匠 said...

A better solution:

http://www.oracle.com/technology/oramag/oracle/09-jul/o49asktom.html

here is the new approach:

14 if ( p_ename is NOT NULL )
15 then
16 l_query := l_query ||
17 ' where ename like
18 ''%''||:p_ename||''%'' ';
19 else
20 l_query := l_query ||
21 ' where (1=1 or
22 :p_ename is null) ';
23 end if;

Tim... said...

Hi.

That approach has been around for a while now. I would describe it as a "different" approach, rather than a "better" one. Each have their positive and negative points.

Cheers

Tim...

DO NOT ask technical questions here, that's what my forum is for!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

Add your comments here.
Name
Comment
(max 400 chars - plain text)