Home » RDBMS Server » Server Administration » Procedure
Procedure [message #374444] Tue, 12 June 2001 09:56 Go to next message
Sue
Messages: 49
Registered: May 2000
Member
I have a procedure that has a set of delete statements and the parameters it take is the emplid.
The procedure deletes the one emplid per the executuion of procedure .But now I have a set of emplids that needs to be deleted
I cannot delete on at a time .Can anybody tell me how do I use this procedure or what else shall I do ?

Thanks in advance,
Sue
Re: Procedure [message #374448 is a reply to message #374444] Wed, 13 June 2001 04:45 Go to previous messageGo to next message
K.SREENIVASAN
Messages: 110
Registered: January 2001
Location: banglore
Senior Member
HAI,
IN THE MAIN PROGRAM,YOU CALL THE
PROCEDURE BY USING THE WHILE LOOP(OR) GIVE THE CODE AND FULL DETAILS ABOUT THE PROGRAM.I WILL HELP YOU.

BYE AND TAKE CARE.
K.SREENIVASAN
Re: Procedure [message #374489 is a reply to message #374448] Thu, 14 June 2001 11:29 Go to previous messageGo to next message
Sue
Messages: 49
Registered: May 2000
Member
Hi SREENIVASAN

Here is the procedure .It takes one emplid as a parameter at a time and deletes it from all the tables.What I wnt to do is delete in Bulk i,e I have a bunch of data that is to be deleted from the tables I cannot do this with this procedure.Please help me in deleteig the records (they are atleast 100 records to be deleted)

Thanx.
SUE

PROCEDURE Remove_All_Data
(p_emplid IN VARCHAR2) IS

BEGIN
DELETE FROM atlsd.FF_OTHERS_BULK_SHIP WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_DEPENDENT_BENEF
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_PRIORWORK_EXPER
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_ACCOMPLISHMENTS
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_PERSONAL_PHONE
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_DEMOG
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_START_DT
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_PERS_NID
WHERE emplid = p_emplid;

--due to integrity constraints, FF_OTHERS_PER_DATA must be deleted from last
DELETE FROM atlsd.FF_OTHERS_PER_DATA
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_TRANSFER_HIST
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_PROMOTION_HIST
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_PENDING_EMPL_STATUS
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_PENDING_ADDRESS
WHERE emplid = p_emplid;

END;
Re: Procedure [message #374490 is a reply to message #374448] Thu, 14 June 2001 11:38 Go to previous message
Sue
Messages: 49
Registered: May 2000
Member
Hi SREENIVASAN

Here is the procedure .It takes one emplid as a parameter at a time and deletes it from all the tables.What I wnt to do is delete in Bulk i,e I have a bunch of data that is to be deleted from the tables I cannot do this with this procedure.Please help me in deleteig the records (they are atleast 100 records to be deleted)

Thanx.
SUE

PROCEDURE Remove_All_Data
(p_emplid IN VARCHAR2) IS

BEGIN
DELETE FROM atlsd.FF_OTHERS_BULK_SHIP WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_DEPENDENT_BENEF
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_PRIORWORK_EXPER
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_ACCOMPLISHMENTS
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_PERSONAL_PHONE
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_DEMOG
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_START_DT
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_OTHERS_PERS_NID
WHERE emplid = p_emplid;

--due to integrity constraints, FF_OTHERS_PER_DATA must be deleted from last
DELETE FROM atlsd.FF_OTHERS_PER_DATA
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_TRANSFER_HIST
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_PROMOTION_HIST
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_PENDING_EMPL_STATUS
WHERE emplid = p_emplid;

DELETE FROM atlsd.FF_PENDING_ADDRESS
WHERE emplid = p_emplid;

END;
Previous Topic: SQL statement
Next Topic: SQL and JOINS
Goto Forum:
  


Current Time: Thu Jul 04 21:06:19 CDT 2024