Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing parameter into a Package

Status
Not open for further replies.

Andrzejek

Programmer
Jan 10, 2006
8,509
US
I would like to create one text file (CSV file) from the data in my Oracle 12 data base. This file will be created from 8 different requests from different tables, but all requests will be based on the same number of ID’s:
Each request will be based on something like:

First part of TextFile.CSV:[tt]
Select * From MyTableA
Where ID IN (123, 234, 345, 456)
[/tt]
Second part of TextFile.CSV:[tt]
Select * From MyTableB
Where ID IN (123, 234, 345, 456)
[/tt]
Third part of TextFile.CSV:[tt]
Select * From MyTableX
Where ID IN (123, 234, 345, 456)
[/tt]
And so on…

I will know the IDs and I will pass them from my windows application to the Package.

So I think I need to create a Package, pass the ‘list’ (?) of IDs as an IN parameter into that Package, and in that Package I need to have 8 separate Procedures that will also use this passed parameter to create all parts of this CSV text file.

Any help of how to create a Package that will accept an IN parameter (a list of numbers) and pass this parameter into separate Procedures would be much appreciated.

I did write several simple Stored Procedures (not Packages), but I am not an expert.
More like 'trial and error' kind of guy, unfortunately...

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top