sql - MERGE conflict foreign key constraint -
i use merge
update
or insert
data database. when merge
tables jw_materialdata
or jw_materialdata2pl
fk errors seen below.
the merge statement conflicted foreign key constraint "fk_jw_materialdata_cmat_material". conflict occurred in database "test", table "dbo.cmat_material", column 'camosguid'.
and
the merge statement conflicted foreign key constraint "fk_jw_materialdata2pl_cmat_materialtext". conflict occurred in database "test", table "dbo.jw_materialdata", column 'camosguid'.
i've tried different order of merge
statements didn't help. tried first cmat_material
, cildren. or first child jw_materialdata2pl
, jw_materialdata
, cmat_material
.
the dependencies these: cmat_material
> jw_materialdata
> jw_materialdata2pl
cmat_material
> cmat_materialtext
cmat_pricelist
> jw_materialdata2pl
does have idea else can do? i've database same structure not same data , there don't have problem.
what proper order of merge
statements? maybe did wrong?
apparently there still problem order of statements. after putting them again in proper order worked.
Comments
Post a Comment