hi ,
i have one parent table with 3 fields, id, name and date with no primary key.
i have inherited 6 child tables from the parent table with the same table structure of the parent.
i have created one trigger too to insert data in the child table whenever inserted in the parent table checking the date of one year. if it's between jan and feb of that year then insert into 1st child table, if it's between march and april then insert into 2nd child table and so on.and all the child table has the primary key id.
when ever i insert the same id with the same date, then it will not allow to insert in any of the child table. but when i insert same id with different date, it allows to insert into different child table and in the parent table too.
what i wanted is whenever i insert the id and the date, if the id exists in any of the child table, it should not insert into either the parent table or any child table.
is it possible to make all the child tables behave as a single table to check whether the id already exists or not???
is it possible to do so?
even if i use the primary key in the parent table i.e. id, it still inserts the data in the child tables according to the date.
plz help
with best regards
i have one parent table with 3 fields, id, name and date with no primary key.
i have inherited 6 child tables from the parent table with the same table structure of the parent.
i have created one trigger too to insert data in the child table whenever inserted in the parent table checking the date of one year. if it's between jan and feb of that year then insert into 1st child table, if it's between march and april then insert into 2nd child table and so on.and all the child table has the primary key id.
when ever i insert the same id with the same date, then it will not allow to insert in any of the child table. but when i insert same id with different date, it allows to insert into different child table and in the parent table too.
what i wanted is whenever i insert the id and the date, if the id exists in any of the child table, it should not insert into either the parent table or any child table.
is it possible to make all the child tables behave as a single table to check whether the id already exists or not???
is it possible to do so?
even if i use the primary key in the parent table i.e. id, it still inserts the data in the child tables according to the date.
plz help
with best regards
Comment