Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I define a cursor programmatically ?
"Paul Quenneville" <paulq_at_home.com> wrote in message news:<VXzM7.187943$5h5.82953226_at_news3.rdc2.on.home.com>...
> pass the date as a parameter to the cursor.
>
> "Stanley Shapiro" <stanley.shapiro_at_wcom.com> wrote in message
> news:326e0677.0111261312.54851073_at_posting.google.com...
> > I need to generate a select with conditions that change at each
> > execution. For example, WHERE DATETIME=date1 or DATETIME=date2 or
> > DATETIME=date3 ...
> > I have coded the set of computed values date1, date2,... as elements
> > of a VARRAY named 'dates'.
> > I cannot figure out how to put together the procedure that computes
> > 'dates' with the procedure that runs the SELECT.
You can try using native dynaimc sql.
sql_stmt := 'select stuff from table_name where date1 = ' || date1; sql_stmt := sql_stmt || ' or date2 = ' || date2 || ' or date3 = ' || date3;
execute immediate sql_stmt; Received on Tue Nov 27 2001 - 15:20:35 CST
![]() |
![]() |