The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE update_lot_age( x_retcode OUT NOCOPY /* file.sql.39 change */ VARCHAR2
,x_errbuf OUT NOCOPY /* file.sql.39 change */ VARCHAR2
,p_age_for_expired_lots IN VARCHAR2
) IS
var_age_for_expired_lots varchar2(10);
select ROWID,
INVENTORY_ITEM_ID,
ORGANIZATION_ID ,
CREATION_DATE,
EXPIRATION_DATE,
ORIGINATION_DATE
from mtl_lot_numbers
where trunc(expiration_date) <= nvl(origination_date,creation_date);
select ROWID,
INVENTORY_ITEM_ID,
ORGANIZATION_ID ,
CREATION_DATE,
EXPIRATION_DATE,
ORIGINATION_DATE
from mtl_lot_numbers;
update mtl_lot_numbers
set age= trunc(sysdate) - trunc(nvl(lot_rec.origination_date,lot_rec.creation_date))
where rowid = lot_rec.rowid;
update mtl_lot_numbers
set age= trunc(sysdate) - trunc(nvl(lot_rec.origination_date,lot_rec.creation_date))
where rowid = lot_rec.rowid;
, 'Update Age for Lot Attributes '
);
END update_lot_age;