Home » SQL & PL/SQL » SQL & PL/SQL » How to create one procedure to produce 3 output files
How to create one procedure to produce 3 output files [message #245192] Fri, 15 June 2007 07:29 Go to next message
lamnguyen14
Messages: 119
Registered: March 2007
Location: Virginia
Senior Member
Good Morning.

I try to create a procedure that produces 3 output files:

file_handleQ := utl_file.fopen('H_RESOURE',outfilenameQ,'w');
file_handleA := utl_file.fopen('H_RESOURE',outfilenameA,'w');
file_handleR := utl_file.fopen('H_RESOURE'',outfilenameR,'w');

These 3 output files are identical except the ‘location’:

ID
SSN
ADDr
LOCATION
HR
DEPENDENT
………

When ‘outfilenameQ’  location = 1 
             and I need to update table H_Resource, set HR = ‘y’ 
When ‘outfilenameA’  location = 2
When ‘outfilenameR’  location = 3

Would you please to show me the way I can write one procedure to produce 3 output files instead of writing 3 procedures.

Your answer is appreciated and waited for.

Re: How to create one procedure to produce 3 output files [message #247483 is a reply to message #245192] Tue, 26 June 2007 01:36 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
So, basically you want:
1. Write 3 output files based on the same table but with 1 different column.
2. Update a table.

Could you post more details?

MHE
Re: How to create one procedure to produce 3 output files [message #247507 is a reply to message #247483] Tue, 26 June 2007 02:59 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Hi Maarten,
He got it answered in http://www.orafaq.com/forum/m/246575/105378/#msg_246575
(Maybe now, he'll see why we shouldn't cross post Smile
Re: How to create one procedure to produce 3 output files [message #247509 is a reply to message #247507] Tue, 26 June 2007 03:01 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Embarassed

http://www.orafaq.com/forum/fa/448/0/


closed.

MHE
Previous Topic: Both SAP and IMS replies are invoking the same function in stored procedure so need to synchronise
Next Topic: knowing the referenced tables
Goto Forum:
  


Current Time: Sun Dec 04 14:46:31 CST 2016

Total time taken to generate the page: 0.14609 seconds