Subject | Re: [firebird-support] Master-Details Table |
---|---|
Author | Anderson Farias |
Post date | 2007-11-23T01:12:18Z |
Hi,
From: "nick_the_greek"
detail table like:
[code]
select count(*) from detail
where master_field=new.master_field
into :detail_count;
if (detail_count>=4) than
exception some_custom_exception;
[/code]
Regards,
Anderson
From: "nick_the_greek"
> How can limit the records of the Details Table ,One way I can think of is creating a 'before insert or update' trigger on
> for example for one record in master table to have
> max 4 record in details table.
detail table like:
[code]
select count(*) from detail
where master_field=new.master_field
into :detail_count;
if (detail_count>=4) than
exception some_custom_exception;
[/code]
Regards,
Anderson