一、导入适商品适用车型
二、商品档案页面上面列表中有适用车型、但基础资料的适用车型没有显示出来。如下图
三、解决方法:
update a
set V_MODES = b.NAME,applies_vmode = b.NAME
from
MS_Material a
left join (
SELECT B.ITEM_ID ,LEFT(StuList,LEN(StuList)-1) as NAME FROM (
SELECT A.ITEM_ID ,
(SELECT ITEM_NAME+',' FROM MS_CarModel c left join MS_Material d on (c.CM_CODE = d.ITEM_ID)
WHERE c.ITEM_ID =A.ITEM_ID
FOR XML PATH('')) AS StuList
FROM MS_Material A
GROUP BY ITEM_ID
) B
where isnull(LEFT(StuList,LEN(StuList)-1),'')<>''
) b on(a.ITEM_ID = b.ITEM_ID)
where a.ITEM_TYPE = 0 and isnull(b.NAME,'')<>''