hello group,
i want to denormalize data in a temporary table for a second
business-system which cant read related datas
what i have:
table Partner: (Id_Partner, NamePartner, ...)
table PartnerProduct: (Id_PartnerProd uct, NamePartnerProd uct, ...)
table Partner2Partner Product: (Id, Id_Partner, Id_PartnerProdu ct)
Partner to PartnerProduct ist n:m relation (thats why i need
Partner2Partner Product)
and the temporary table
TempPartner: (Id_Partner, NamePartnerProd ucts)
whereas NamePartnerProd ucts should contains a comma separated list of
the PartnerProduct-Names
what i need:
a trigger or combination of trigger and SP which
operate like the following:
if on Partner2Partner Product is a Insert or Update made, then Delete
the row in TempPartner which has the Id of the Partner, and then
create a new row which contains all n:m joined PartnerProduct-Names in
it.
i hope the intention and problem are clear.
thanx for answers,
hans
i want to denormalize data in a temporary table for a second
business-system which cant read related datas
what i have:
table Partner: (Id_Partner, NamePartner, ...)
table PartnerProduct: (Id_PartnerProd uct, NamePartnerProd uct, ...)
table Partner2Partner Product: (Id, Id_Partner, Id_PartnerProdu ct)
Partner to PartnerProduct ist n:m relation (thats why i need
Partner2Partner Product)
and the temporary table
TempPartner: (Id_Partner, NamePartnerProd ucts)
whereas NamePartnerProd ucts should contains a comma separated list of
the PartnerProduct-Names
what i need:
a trigger or combination of trigger and SP which
operate like the following:
if on Partner2Partner Product is a Insert or Update made, then Delete
the row in TempPartner which has the Id of the Partner, and then
create a new row which contains all n:m joined PartnerProduct-Names in
it.
i hope the intention and problem are clear.
thanx for answers,
hans
Comment