Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Conditional Uni...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 6963 of 7280
Post > Topic >>

Conditional Union ?

by General Fear <richmarin@[EMAIL PROTECTED] > Jun 19, 2008 at 09:32 PM

I am using 10g.

Below is a crude example of what I am trying to do

Procedure
( pi_input as interger
)

is

Cursor A
   is
Select 'A' as Letter from Dual;

Cursor B
  is
Select 'A' as Letter from Dual;
   Union
Select 'B' as Letter from Dual;

If pi_input = 1 then
  Open A
Else
  Open B
End If

Notice that Select 'A' as Letter from Dual  is 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.
 




 4 Posts in Topic:
Conditional Union ?
General Fear <richmari  2008-06-19 21:32:37 
Re: Conditional Union ?
Carlos <miotromailcarl  2008-06-19 23:58:53 
Re: Conditional Union ?
Robert Klemme <shortcu  2008-06-20 01:31:53 
Re: Conditional Union ?
General Fear <richmari  2008-06-20 03:54:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:23:21 CST 2008.