Subject | Re: Triggers suitability |
---|---|
Author | yeohray |
Post date | 2005-10-06T09:07:36Z |
Hi Adam,
In the stored procedure,
before the deletion, additional records for the item are inserted
into the table? How can I ensure that the deletion only applies to
the records that have been read by the cursor, and not to all
records? Thanks.
Ray Mond
In the stored procedure,
> BEGINWould there be a problem if after the sp has read the records but
> FOR SELECT ITEM_ID, SUM(QUANTITY)
> FROM SUMMARYTABLE
> GROUP BY ITEM_ID
> INTO :ITEM_ID, :QUANTITY
> DO
> BEGIN
> DELETE FROM SUMMARYTABLE
> WHERE ITEM_ID = :ITEM_ID;
>
> insert into summarytable (item_id, quantity)
> values (:ITEM_ID, :QUANTITY);
> END
before the deletion, additional records for the item are inserted
into the table? How can I ensure that the deletion only applies to
the records that have been read by the cursor, and not to all
records? Thanks.
Ray Mond