34,593
社区成员
发帖
与我相关
我的任务
分享
UPDATE RdRecords
SET RdRecords.CostPrice=CostPrice_View.CostPrice,
RdRecords.CostMoney=RdRecords.iQuantity*CostPrice_View.CostPrice
FROM RdRecord,RdRecords,CostPrice_View
WHERE RdRecord.[ID]=RdRecords.[ID]
AND CostPrice_View.cInvCode=RdRecords.cInvCode
AND (RdRecord.cVouchType='413' or RdRecord.cVouchType='414')
AND RdRecord.iDate>=CostPrice_View.BeginDate
AND RdRecord.iDate<=CostPrice_View.EndDate
AND RdRecord.cWhCode=CostPrice_View.cWhCode
AND CostPrice_View.iCode=1
UPDATE
RdRecords
SET
CostPrice=CostPrice_View.CostPrice,
CostMoney=RdRecords.iQuantity*CostPrice_View.CostPrice
FROM
RdRecord,RdRecords,CostPrice_View
WHERE
RdRecord.[ID]=RdRecords.[ID]
AND
CostPrice_View.cInvCode=RdRecords.cInvCode
AND
(RdRecord.cVouchType='413' or RdRecord.cVouchType='414')
AND
RdRecord.iDate>=CostPrice_View.BeginDate
AND
RdRecord.iDate<=CostPrice_View.EndDate
AND
RdRecord.cWhCode=CostPrice_View.cWhCode
AND CostPrice_View.iCode=1
UPDATE RdRecords
SET CostPrice=CostPrice_View.CostPrice,
CostMoney=RdRecords.iQuantity*CostPrice_View.CostPrice
FROM RdRecord,RdRecords,CostPrice_View
WHERE RdRecord.[ID]=RdRecords.[ID]
AND CostPrice_View.cInvCode=RdRecords.cInvCode
AND (RdRecord.cVouchType='413' or RdRecord.cVouchType='414')
AND RdRecord.iDate>=CostPrice_View.BeginDate
AND RdRecord.iDate<=CostPrice_View.EndDate
AND RdRecord.cWhCode=CostPrice_View.cWhCode
AND CostPrice_View.iCode=1
--小小修改了一下
select
CostPrice=CostPrice_View.CostPrice,
CostMoney=RdRecords.iQuantity*CostPrice_View.CostPrice
FROM
RdRecords,RdRecord,CostPrice_View
WHERE
RdRecord.[ID]=RdRecords.[ID]
AND
CostPrice_View.cInvCode=RdRecords.cInvCode
AND
RdRecord.cVouchType in ('413','414')
AND
RdRecord.iDate between CostPrice_View.BeginDate and CostPrice_View.EndDate
AND
RdRecord.cWhCode=CostPrice_View.cWhCode
AND CostPrice_View.iCode=1