Home » Other » Test » yada test (100gi)
yada test [message #440912] Wed, 27 January 2010 22:23 Go to next message
Kevin H
Messages: 5
Registered: January 2010
Location: Arizona
Junior Member
DECLARE
v_plnr VARCHAR2(12);
v_srlfl VARCHAR2(1);
v_lotfl VARCHAR2(1);
v_mkby VARCHAR2(1);
v_reqd VARCHAR2(1);
v_max_key VARCHAR2(12);
wrong_item_type EXCEPTION;
CURSOR c1 IS
SELECT planner_id,
serial_reqd_fl,
lot_reqd_fl,
s_make_buy_cd,
qc_reqd_fl
FROM deltek.part
WHERE part_key = :new.item_key;
CURSOR c2 IS
SELECT Max(item_key)
FROM yada.item
WHERE item_id = :new.item_id;
BEGIN
OPEN c2;

LOOP
FETCH c2 INTO v_max_key;

EXIT WHEN c2%NOTFOUND;

IF v_max_key = :new.item_key THEN
IF :new.s_item_type = 'P' THEN
OPEN c1;

LOOP
FETCH c1 INTO v_plnr,v_srlfl,v_lotfl,v_mkby,
v_reqd;

EXIT WHEN c1%NOTFOUND;

INSERT INTO yada.qa_item_master_stgo
VALUES (:new.item_id,
:new.item_key,
v_plnr,
v_srlfl,
v_lotfl,
v_mkby,
v_reqd);
END LOOP;

CLOSE c1;
ELSE
RAISE wrong_item_type;
END IF;
ELSE
EXIT;
END IF;
END LOOP;

CLOSE c2;
END;
/
Quote:

[Updated on: Wed, 27 January 2010 23:40]

Report message to a moderator

Re: yada test [message #440940 is a reply to message #440912] Thu, 28 January 2010 00:45 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
If you enclose your code with code tags, it is formatted ok:

[code]
declare
yada yada
begin
blah blah
end;
[/code]

will be displayed as
declare
  yada yada
begin
  blah blah
end;


Note that the first part IS formatted in my post; the formatting in the code-tags is not something you get for free, the code tags just make sure that existing formatting is preserved!

[Updated on: Thu, 28 January 2010 00:46]

Report message to a moderator

Previous Topic: test (merged 2)
Next Topic: test attachment
Goto Forum:
  


Current Time: Tue Sep 27 21:12:22 CDT 2016

Total time taken to generate the page: 0.11100 seconds