by Robert Klemme <shortcutter@[EMAIL PROTECTED]
>
Jun 20, 2008 at 01:31 AM
On Jun 20, 6:32=A0am, General Fear <richma...@[EMAIL PROTECTED]
> wrote:
> I am using 10g.
>
> Below is a crude example of what I am trying to do
>
> Procedure
> ( pi_input as interger
> )
>
> is
>
> Cursor A
> =A0 =A0is
> Select 'A' as Letter from Dual;
>
> Cursor B
> =A0 is
> Select 'A' as Letter from Dual;
> =A0 =A0Union
> Select 'B' as Letter from Dual;
>
> If pi_input =3D 1 then
> =A0 Open A
> Else
> =A0 Open B
> End If
>
> Notice that Select 'A' as Letter from Dual =A0is in two cursors. If I
> have to make a change to Cursor A, I also have to do it again in
> cursor B because "Select 'A' as Letter from Dual' is in two cursors.
>
> Is it possible to eliminate repeat code in the above example? What do
> I need to do.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperation=
s.htm#sthref1392
robert