Forums | 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...
Prepared Statement Error: Table './oraclebasecms/cms_page_comment_uuids' is marked as crashed and should be repaired