creating stored procedure

From: kushan <vikasmamta_at_my-deja.com>
Date: Tue, 06 Feb 2001 14:45:00 GMT
Message-ID: <95p2l8$4ik$1_at_nnrp1.deja.com>


 Hi

[Quoted] I am creating a stored procedure to select the data from 5 tables & [Quoted] then inserting into one table. And I want to run this procedure hourly [Quoted] [Quoted] by setting its cronjob. Can you check my syntax

[Quoted] Create or replace procedure P1
Begin

[Quoted] Select ......... from ..... where...=....;
[Quoted] Insert into temp table ........;
Select ......... from ..... where...=....;
Insert into temp table ........;

....like this many selects & inserts...... end;

Is that necessary to give parameters in or out or would it work.

one more thing Everytime when the procedure will run it will get the [Quoted] completedata from different table & insert it into temp table so that [Quoted] [Quoted] temp table keep on getting duplicated rows. If I create a primary key in the temp table would that help me. Or do I need to use truncate. If [Quoted] [Quoted] So where i need to write this truncate in the procedure. Please help me [Quoted] [Quoted] out with this problem> I am in real trouble.

Thanks

--
[Quoted] RICHARD


[Quoted] Sent via Deja.com
http://www.deja.com/
Received on Tue Feb 06 2001 - 15:45:00 CET

Original text of this message