Home » Developer & Programmer » Forms » How to use associative array in procesure (10g)
How to use associative array in procesure [message #298554] Wed, 06 February 2008 06:31 Go to next message
AnamikaChaudhary
Messages: 33
Registered: December 2007
Location: Mumbai
Member
Hi,

This is my table structure:

ID NUMBER(5)
CCOMMODITY_NAME VARCHAR2(40)
CPROHIBITED_PORT VARCHAR2(30)
CCOMMENT VARCHAR2(600)


This is the code :

DECLARE
record_found NUMBER(5);


BEGIN

select count(*)
into record_found
from prohibited_commodity
where CCOMMODITY_NAME = :blk2.commodity1
--and CPROHIBITED_PORT IN (select CPROHIBITED_PORT from prohibited_commodity);
and CPROHIBITED_PORT = :blk2.load_code;


if record_found > 0 then

message (' THIS COMMODITY is restricted to: '||:blk2.load_code||'');
raise form_trigger_failure;
else

NEXT_FIELD;
end if;
END ;




I have to use this code in procedure and the table is declared to be ASSOCIATIVE ARRAY. So that this code can be used in multiple forms ..


please help me
thanks
Re: How to use associative array in procesure [message #298643 is a reply to message #298554] Wed, 06 February 2008 23:17 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Google 'associative arrays oracle' and you will find many, many articles including http://www.devshed.com/c/a/Oracle/Associative-Arrays-in-Oracle-PLSQL-Introduction/

David
Previous Topic: I develop oracle 10g application how can i browse it from internet
Next Topic: Commit not saving
Goto Forum:
  


Current Time: Mon Feb 03 03:05:53 CST 2025