Subject | Re: No problem , but help needed ! |
---|---|
Author | csswa |
Post date | 2002-05-30T19:22:27Z |
create trigger tr_sample for t_tables A (and B)
after insert
as
begin
insert into table_C
(*names of fields in C*)
values
(new.field1, new.field2... more fields from this table)
where... *required conditions*;
end
or if the trigger fires on Table C...
create trigger tr_sample for t_table_C
after insert
as
begin
insert into table_C
(*names of fields in C*)
*select statement on table A*;
insert into table_C
(*names of fields in C*)
*select statement on table B*;
end
Regards,
Andrew Ferguson
-- I'm a cartoon character - I don't have to wear pants.
after insert
as
begin
insert into table_C
(*names of fields in C*)
values
(new.field1, new.field2... more fields from this table)
where... *required conditions*;
end
or if the trigger fires on Table C...
create trigger tr_sample for t_table_C
after insert
as
begin
insert into table_C
(*names of fields in C*)
*select statement on table A*;
insert into table_C
(*names of fields in C*)
*select statement on table B*;
end
Regards,
Andrew Ferguson
-- I'm a cartoon character - I don't have to wear pants.
--- In ib-support@y..., "kiki446" <k-info@z...> wrote:
> Hi Martin ,
>
> those are much more words that I need :) . Please , if you are so
> efficient with triggers, please advise how to insert data in table
C
> consisted on values from table A and table B ( little short
example )
>
> Please ??
> Goran
>
> --- In ib-support@y..., "Martijn Tonies" <m.tonies@u...> wrote:
> > Hi,
> >
> > One word: TRIGGERS
> >
> > More words: download the IB/FB documentation - see
> > http://www.ibphoenix.com/ibp_interbase_download.html#Docs