Bulk Change Purchase Lead

-1. Import excle to the updatebuyer table of the database
Verify that there is no duplication: SELECT COUNT (fnumber), fnumber FROM updatebuyer GROUP BY fnumber ORDER BY COUNT (fnumber) DESC

–2. The inquiry of the person in charge of English O's fitmid is 136928

SELECT FItemID,* FROM t_Emp WHERE FName=‘O’

–3, Update the field FORderRector in the table t_ICItemMaterial where the person in charge of material purchasing is located

UPDATE t_ICItemMaterial SET FOrderRector=136928 WHERE FItemID IN (SELECT v.FItemID FROM updatebuyer u LEFT JOIN t_ICItem v ON u.FNumber=v.fnumber)

SELECT FName,* FROM t_Emp r ORDER BY r.FName

SELECT u.FOrderRector,* 

    FROM CVT_TT_ICInventory_Money u

        LEFT JOIN t_ICItem v

            ON u.FItemID = v.FItemID

        LEFT JOIN t_Emp r

            ON v.FOrderRector = r.FItemID;
Published 100 original articles · Like 106 · Visit 270,000+

Guess you like

Origin blog.csdn.net/lglglgl/article/details/88045069