Re: Trigger Question
From: Fraser Boswell <Fraser.Boswell_at_spamme.ed.ac.uk>
Date: 1999/06/25
Message-ID: <37736B69.1BE7AD48_at_spamme.ed.ac.uk>#1/1
Date: 1999/06/25
Message-ID: <37736B69.1BE7AD48_at_spamme.ed.ac.uk>#1/1
If it's in the database you want to do it use an after insert trigger on
table A along the lines of:
update tableb set countfield = (select count(*) from tableA where
criteria...)
Ashwin wrote:
> Hi all !
>
> Here's the situation....
>
> I have two tables (table A and table B). Whenever a row in tableA is
> inserted,
> I need to get the count of the rows(based on a criteria) in table A and
> update table B. This needs to be done automatically.
> Using views doesn't help.
>
> Has any one come across a similar situation ?
>
> Any help is greatly appreciated.
>
> Thanks,
> Ashwin
Received on Fri Jun 25 1999 - 00:00:00 CEST