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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass array into an oracle stored procedure

Status
Not open for further replies.

pnad

Technical User
May 2, 2006
133
US
Hello,

I have a stored procedure something like this:

CREATE OR REPLACE PROCEDURE ADPGenLedgerInfo(p_CompanyCode IN CHAR,
ADPData IN OUT ADPGenLedgerData.ADPGenLedgerCur) AS
v_AlmrsRunDate_YYYYMMDD VARCHAR2(8);

BEGIN
......
select * from table a
where companycode in (p_CompanyCode)


END ADPGenLedgerInfo

The procedure works when p_companyCode is a single value. Is it possible to pass multiple values such as 01,03 so that the query inside the procedure looks like

select * from table a
where companycode in ('01','03')

Any help will be appreciated.

 
Did you try asking Tom? [3eyes]



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Not yet ! Tek-Tips has always helped me so far so I tried here first.

I did look at some examples/queries out there on AskTom but they werent very helpful !
 

Check the link I posted, you will get your answer there. [noevil]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top