The Oracle stored procedure below is called into an asp page as an ADO dataset.
CREATE OR REPLACE PACKAGE BODY "PACK_CHARLESTON"
AS
PROCEDURE CHARLESTON
(JKNUM OUT o_JKNUM,
JKNAME OUT o_JKNAME,
BUILD OUT o_BUILD)
IS
-- To retrieve the listing for creating the affected BUILDs
-- form XYZ. The return will only give a listing of CHARLESTONs
-- and BUILD that are currently listed within CHARLES2.
CURSOR CHARLESTON_cur IS
SELECT A.CHARLESTON, C.BUILD,
B.PAYROLL_NUMBER AS JKNUM,
B.EMP_NAME AS JKNAME
FROM CHARLES2 A,
CHARLES2 B,
BUILD C
WHERE B.PAYROLL_NUMBER = A.CHARLESTON
AND B.PAYROLL_NUMBER IS NOT NULL
AND A.BUILD = C.BUILD
GROUP BY A.CHARLESTON, C.BUILD, B.PAYROLL_NUMBER, B.EMP_NAME
ORDER BY C.BUILD ASC;
percount NUMBER DEFAULT 1;
BEGIN
FOR singleperson IN CHARLESTON_cur
LOOP
JKNUM(percount) := singleperson.JKNUM;
JKNAME(percount) := singleperson.JKNAME;
BUILD(percount) := singleperson.BUILD;
percount := percount + 1;
END LOOP;
END;
END;
/
What I have to do is instead of this thing returning the Charleston from table A; I need the data returned from table c and in that table it has Charleston1, Charleston2, and Charleston3 in 3 different fields but I need them to be returned the same way it was returning the Charleston from one field.
I hope that makes sense.
Thanks for any help you can give.
CREATE OR REPLACE PACKAGE BODY "PACK_CHARLESTON"
AS
PROCEDURE CHARLESTON
(JKNUM OUT o_JKNUM,
JKNAME OUT o_JKNAME,
BUILD OUT o_BUILD)
IS
-- To retrieve the listing for creating the affected BUILDs
-- form XYZ. The return will only give a listing of CHARLESTONs
-- and BUILD that are currently listed within CHARLES2.
CURSOR CHARLESTON_cur IS
SELECT A.CHARLESTON, C.BUILD,
B.PAYROLL_NUMBER AS JKNUM,
B.EMP_NAME AS JKNAME
FROM CHARLES2 A,
CHARLES2 B,
BUILD C
WHERE B.PAYROLL_NUMBER = A.CHARLESTON
AND B.PAYROLL_NUMBER IS NOT NULL
AND A.BUILD = C.BUILD
GROUP BY A.CHARLESTON, C.BUILD, B.PAYROLL_NUMBER, B.EMP_NAME
ORDER BY C.BUILD ASC;
percount NUMBER DEFAULT 1;
BEGIN
FOR singleperson IN CHARLESTON_cur
LOOP
JKNUM(percount) := singleperson.JKNUM;
JKNAME(percount) := singleperson.JKNAME;
BUILD(percount) := singleperson.BUILD;
percount := percount + 1;
END LOOP;
END;
END;
/
What I have to do is instead of this thing returning the Charleston from table A; I need the data returned from table c and in that table it has Charleston1, Charleston2, and Charleston3 in 3 different fields but I need them to be returned the same way it was returning the Charleston from one field.
I hope that makes sense.
Thanks for any help you can give.