Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Open Cursor Using

Blues BreakerSep 24 2012 — edited Oct 17 2012
Greetings -

I have a block of code on a report in grid control and it works ok.
What annoys me is that I need to specify the parameter in the
open cursor so many times. I know there is an easier way.
Here is a simple example of that section:


dt1 := sysdate - 90

my_str := 'select * from my_table where collection_timestamp
between :1 and (:1 + 1)';

open cursor my_cursor for my_str using dt1, dt1;

However - in my code I use this about 24 times. Any help would be appreciated.

Thanks,

Brian
This post has been answered by BluShadow on Oct 17 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2012
Added on Sep 24 2012
7 comments
579 views