select *
from vw_ce_ims_items
--where ItemID = 826112425000404310
--where ParentIMSItemID = 826901296000385570
where ItemID IN (select childitemId from ims_associations where ParentItemID =826901296000385570)
select *
from vw_ce_dms_transactions
where uid=826112425000404310
where IPN = 826901296000385570
select *
from ims_associations
where ChildItemID = 826112425000404310
select *
from ims_associations
where ParentItemID=826901296000385570
commit
begin tran
delete from ims_associations
where ParentItemID= 826901295001728860
and ChildItemID in (
826112425000404367,
826112425000404366,
826112425000404365,
826112425000404364,
826112425000404363,
826112425000404362,
826112425000404361,
826112425000404360,
826112425000404359,
826112425000404358,
826112425000404315,
826112425000404314,
826112425000404313,
826112425000404312,
826112425000404311,
826112425000404310,
826112425000404309,
826112425000404308,
826112425000404307,
826112425000404306,
826112425000404305,
826112425000404304,
826112425000404303,
826112425000404302
)