Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: multiple runs with the same ref cursor?
pobox002_at_bebub.com wrote:
> A good approach using dynamic SQL which can use indexes but does not
> have the drawback of shared pool fragmentation that will happen if bind
> variables are not used is described at Ask Tom here.
>
> http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1288401763279
>
> It uses sys_context to prevent literals being embedded in the SQL
> statement. I have used this technique myself and it works very well.
>
> Hth
> --
> MJB
See i was i thinkg about using something like this...
for i in 1..location_array.Count
LOOP
vgbl_sql := ' where contains('||location_array(i)||',
'||word_to_search||', 1) > 0 ';
END LOOP;
vgbl_sql := vgbl_sql || 'select distinct score(1) score, projectid from
project ';
OPEN cv for vgbl_sql;
but i keep getting this error..
ORA-00604: error occurred at recursive SQL level 1 ORA-01003: no
statement parsed
Received on Wed Aug 03 2005 - 08:13:16 CDT
![]() |
![]() |