SQL 如下:
USE UFDATA_006_2009
DELETE rdrecords WHERE autoid =529
DELETE rdrecords WHERE autoid =530
USE UFDATA_006_2009
INSERT INTO dbo.RdRecords (
AutoID,
ID,
cInvCode,
iNum,
iQuantity,
iUnitCost,
iPrice,
iAPrice,
iPUnitCost,
iPPrice,
cBatch,
cObjCode,
cVouchCode,
cFree1,
cFree2,
iFlag,
dSDate,
iTax,
iSQuantity,
iSNum,
iMoney,
iSOutQuantity,
iSOutNum,
iFNum,
iFQuantity,
dVDate,
iTrIds,
cPosition,
cDefine22,
cDefine23,
cDefine24,
cDefine25,
cDefine26,
cDefine27,
cItem_class,
cItemCode,
iPOsID,
fACost,
iDLsID,
iSBsID,
iSendQuantity,
iSendNum,
cName,
cItemCName,
iEnsID,
cFree3,
cFree4,
cFree5,
cFree6,
cFree7,
cFree8,
cFree9,
cFree10,
cBarCode,
iNQuantity,
iNNum,
cAssUnit,
dMadeDate,
iMassDate,
cDefine28,
cDefine29,
cDefine30,
cDefine31,
cDefine32,
cDefine33,
cDefine34,
cDefine35,
cDefine36,
cDefine37,
iMPoIds,
iCheckIds,
cBVencode,
cInVouchCode,
bGsp,
cGspState,
iArrsId,
cCheckCode,
iCheckIdBaks,
cRejectCode,
iRejectIds,
cCheckPersonCode,
dCheckDate,
iTookQuantity,
iInvalidQuantity,
iOMMPoIds,
iPBVQuantity,
iPBVyQuantity,
iBalance,
iHXQuantity,
cCAItemCode,
cCBGJDXCode,
bfilled,
iarrptrintype,
ichkautoid,
irejid,
crejtext,
iTaxCost,
iTaxPrice,
iTaxRate,
iSum,
iATaxCost,
iATaxPrice,
iATaxRate,
iASum
)
SELECT
AutoID,
ID,
cInvCode,
iNum,
iQuantity,
iUnitCost,
iPrice,
iAPrice,
iPUnitCost,
iPPrice,
cBatch,
cObjCode,
cVouchCode,
cFree1,
cFree2,
iFlag,
dSDate,
iTax,
iSQuantity,
iSNum,
iMoney,
iSOutQuantity,
iSOutNum,
iFNum,
iFQuantity,
dVDate,
iTrIds,
cPosition,
cDefine22,
cDefine23,
cDefine24,
cDefine25,
cDefine26,
cDefine27,
cItem_class,
cItemCode,
iPOsID,
fACost,
iDLsID,
iSBsID,
iSendQuantity,
iSendNum,
cName,
cItemCName,
iEnsID,
cFree3,
cFree4,
cFree5,
cFree6,
cFree7,
cFree8,
cFree9,
cFree10,
cBarCode,
iNQuantity,
iNNum,
cAssUnit,
dMadeDate,
iMassDate,
cDefine28,
cDefine29,
cDefine30,
cDefine31,
cDefine32,
cDefine33,
cDefine34,
cDefine35,
cDefine36,
cDefine37,
iMPoIds,
iCheckIds,
cBVencode,
cInVouchCode,
bGsp,
cGspState,
iArrsId,
cCheckCode,
iCheckIdBaks,
cRejectCode,
iRejectIds,
cCheckPersonCode,
dCheckDate,
iTookQuantity,
iInvalidQuantity,
iOMMPoIds,
iPBVQuantity,
iPBVyQuantity,
iBalance,
iHXQuantity,
cCAItemCode,
cCBGJDXCode,
bfilled,
iarrptrintype,
ichkautoid,
irejid,
crejtext,
iTaxCost,
iTaxPrice,
iTaxRate,
iSum,
iATaxCost,
iATaxPrice,
iATaxRate,
iASum
FROM UFDATA_006_2008..rdrecords WHERE autoid =529
INSERT INTO dbo.RdRecords (
AutoID,
ID,
cInvCode,
iNum,
iQuantity,
iUnitCost,
iPrice,
iAPrice,
iPUnitCost,
iPPrice,
cBatch,
cObjCode,
cVouchCode,
cFree1,
cFree2,
iFlag,
dSDate,
iTax,
iSQuantity,
iSNum,
iMoney,
iSOutQuantity,
iSOutNum,
iFNum,
iFQuantity,
dVDate,
iTrIds,
cPosition,
cDefine22,
cDefine23,
cDefine24,
cDefine25,
cDefine26,
cDefine27,
cItem_class,
cItemCode,
iPOsID,
fACost,
iDLsID,
iSBsID,
iSendQuantity,
iSendNum,
cName,
cItemCName,
iEnsID,
cFree3,
cFree4,
cFree5,
cFree6,
cFree7,
cFree8,
cFree9,
cFree10,
cBarCode,
iNQuantity,
iNNum,
cAssUnit,
dMadeDate,
iMassDate,
cDefine28,
cDefine29,
cDefine30,
cDefine31,
cDefine32,
cDefine33,
cDefine34,
cDefine35,
cDefine36,
cDefine37,
iMPoIds,
iCheckIds,
cBVencode,
cInVouchCode,
bGsp,
cGspState,
iArrsId,
cCheckCode,
iCheckIdBaks,
cRejectCode,
iRejectIds,
cCheckPersonCode,
dCheckDate,
iTookQuantity,
iInvalidQuantity,
iOMMPoIds,
iPBVQuantity,
iPBVyQuantity,
iBalance,
iHXQuantity,
cCAItemCode,
cCBGJDXCode,
bfilled,
iarrptrintype,
ichkautoid,
irejid,
crejtext,
iTaxCost,
iTaxPrice,
iTaxRate,
iSum,
iATaxCost,
iATaxPrice,
iATaxRate,
iASum
)
SELECT
AutoID,
ID,
cInvCode,
iNum,
iQuantity,
iUnitCost,
iPrice,
iAPrice,
iPUnitCost,
iPPrice,
cBatch,
cObjCode,
cVouchCode,
cFree1,
cFree2,
iFlag,
dSDate,
iTax,
iSQuantity,
iSNum,
iMoney,
iSOutQuantity,
iSOutNum,
iFNum,
iFQuantity,
dVDate,
iTrIds,
cPosition,
cDefine22,
cDefine23,
cDefine24,
cDefine25,
cDefine26,
cDefine27,
cItem_class,
cItemCode,
iPOsID,
fACost,
iDLsID,
iSBsID,
iSendQuantity,
iSendNum,
cName,
cItemCName,
iEnsID,
cFree3,
cFree4,
cFree5,
cFree6,
cFree7,
cFree8,
cFree9,
cFree10,
cBarCode,
iNQuantity,
iNNum,
cAssUnit,
dMadeDate,
iMassDate,
cDefine28,
cDefine29,
cDefine30,
cDefine31,
cDefine32,
cDefine33,
cDefine34,
cDefine35,
cDefine36,
cDefine37,
iMPoIds,
iCheckIds,
cBVencode,
cInVouchCode,
bGsp,
cGspState,
iArrsId,
cCheckCode,
iCheckIdBaks,
cRejectCode,
iRejectIds,
cCheckPersonCode,
dCheckDate,
iTookQuantity,
iInvalidQuantity,
iOMMPoIds,
iPBVQuantity,
iPBVyQuantity,
iBalance,
iHXQuantity,
cCAItemCode,
cCBGJDXCode,
bfilled,
iarrptrintype,
ichkautoid,
irejid,
crejtext,
iTaxCost,
iTaxPrice,
iTaxRate,
iSum,
iATaxCost,
iATaxPrice,
iATaxRate,
iASum
FROM UFDATA_006_2008..rdrecords WHERE autoid =530
update IA_Subsidiary set iInCost = 5.21,iAInPrice = 5.21*iAInQuantity where cVouCode ='2008120049' |