Subject | Triggers with tow tables |
---|---|
Author | Juarez A. Mendes |
Post date | 2005-09-21T20:33:51Z |
Hello!
Anybody can help-me?
I have two tables with the following structure
TABLE -> SALES
----------
PRODUCT_ID INTEGER
AMOUNT INTEGER
VALUE INTEGER
DATE_SALE DATES
TABLE SALES_OF_DAY
-----------------------------------
DATE_SALE DATES
PRODUCT_ID
AMOUNT INTEGER
VALUE INTEGER
How create a trigger to accumulate the values of the products sell in
the table SALES_OF_DAY without losing registrations, creating new
registrations for every new day and in case of altering the data
there not to be inconsistency of information?
Thanks!
Juarez A. Mendes
Anybody can help-me?
I have two tables with the following structure
TABLE -> SALES
----------
PRODUCT_ID INTEGER
AMOUNT INTEGER
VALUE INTEGER
DATE_SALE DATES
TABLE SALES_OF_DAY
-----------------------------------
DATE_SALE DATES
PRODUCT_ID
AMOUNT INTEGER
VALUE INTEGER
How create a trigger to accumulate the values of the products sell in
the table SALES_OF_DAY without losing registrations, creating new
registrations for every new day and in case of altering the data
there not to be inconsistency of information?
Thanks!
Juarez A. Mendes