INSERT INTO `pushinventory`( `createdBy`, `createdDate`, `memo`, `modifiedBy`, `modifiedDate`, `accountId`, `amount`, `businessNum`, `businessType`, `count`, `operatorId`, `operatorLog`, `productSku`, `status`, `warehouseId`, `productqualityType`)
select a.modifiedBy, a.modifiedDate,'德国仓重推', a.modifiedBy, a.modifiedDate, b.accountId, a.changesNumber, a.businessNum, a.businessType, 0, a.modifiedBy, null, b.productSku, 'NEW', a.warehouseId, 'GOOD'
from inventoryflowqueuehistory a, product b, inventory c
where a.inventoryId=c.id and c.productId=b.id and a.warehouseId=34 and a.businessType not in ('CHK','CHL','CHL_SL','REV') and a.createdDate > '2019-01-9 21:08:10' ;
从多个表查询数据生成新的记录
最新推荐文章于 2023-05-28 23:32:31 发布