replace into catalog_category_product (
category_id,
product_id,
position

) values (
<@PROCESS@>@select substring(IMP_EXTID from 6 for 12) from IMP_LINK where WGROUPID = <@WGROUPID@> and imp_sourceid =<@SOURCEID@> ##
,<@KEY@>, 1
)
@@GO@@
replace INTO catalog_category_product_index (
category_id,
product_id,
position,
is_parent,
store_id,
visibility
) VALUES (
<@PROCESS@>@select substring(IMP_EXTID from 6 for 12) from IMP_LINK where WGROUPID =  <@WGROUPID@> and imp_sourceid =<@SOURCEID@> ##,
<@KEY@>,
1,
1,
1,
4
);
@@GO@@