Thanks András. I see it now, the constraint is on the field that mirrors the
non zero values and has NULL instead of zeros, yet I can still use my present
field the way it always works in the software, that's great
Kind regards
Bhavbhuti
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Optional FK constraint on 0 (not NULL)
Hi Bhavbhuti,
I can suggest you only a workaround….
1. your current field name is: MASTER_ID
2. add a new field, e.g.: MASTER_ID_FK
3. create a before insert and update trigger which fill up
Hi Bhavbhuti,
I can suggest you only a workaround….
1. your current field name is: MASTER_ID
2. add a new field, e.g.: MASTER_ID_FK
3. create a before insert and update trigger which fill up this field like
this: new.master_id_fk = nullif(master_id, 0);
4. create the foreign key on