1:
2:
3:
|
SELECT tblCostingMain.CMID, tblCostingMain.CMJobNo, tblCostingMain.CMJobTitle, tblCostingMain.CMQuantity, tblCostingMain.CMCSR, tblCostingMain.CMStatus, tblCostingMain.CMDateAdded, tblCostingMain.CMOldFlag, tblInserterMain.IID AS tblInserterMain_IID, tblInserterMain.ICMID, tblInserterMain.ITotalQtyInserted, tblInserterMain.ITotalNoOfInserts, tblInserterMain.IFullRun, tblInserterMain.IPartRun, tblInserterMain.IInfoConfirmed, tblInserterMain.IInsertTitle_Qty, tblInserterMain.IInsertsHold, tblInserterMain.IInsertsSitma, tblInserterMain.IInsertsThrow, tblInserterMain.IMagDistribution, tblInserterMain.ITotalStocks, tblInserterMain.ITotalOdds, tblInserterMain.ITotalMagsInserted, tblInserterMain.IMagsInsertedSign, tblInserterMain.IMachineCleared, tblInserterMain.IMachineClearedSign, tblInserterMain.IInfoComplete, tblInserterMain.IInfoCompleteDate, tblInserterMain.IMagOversQty, tblInserterMain.IAdditionalInfo, tblInserterMain.ISigned, tblInserterMain.IMailedQty, tblInserterMain.ISitmaInstructions, tblInserterMain.ICarrierSupplied, tblInserterMain.ICarrierWePrint, tblInserterMain.IInsertsConfirmed, tblInserterMain.IInsertOversInfo, tblInserterMain.IInsertsInfoCompleted, tblInserterMain.IInsertsInfoCompletedDate, tblInserterMain.ILastUpdate, tblInserterSub3.IS3ID, tblInserterSub3.IID AS tblInserterSub3_IID, tblInserterSub3.IS3InsertNo, tblInserterSub3.IS3InsertName, tblInserterSub3.IS3QtySupplied, tblInserterSub3.IS3Size, tblInserterSub3.IS3WhichCopies, tblInserterSub3.IS3ADVCopies, tblInserterSub3.IS3OutworkQty, tblInserterSub3.IS3OutworkNote, tblInserterSub3.IS3BinderyQty, tblInserterSub3.IS3BinderyNote, tblInserterSub3.IS3BenchQty, tblInserterSub3.IS3BenchNote, tblInserterSub3.IS3SitmaQty, tblInserterSub3.IS3SitmaNote, tblInserterSub3.IS3BalanceQty, tblInserterSub3.IS3BalanceNote, tblInserterSub3.IS3COI, tblInserterSub3.IS3Info, tblInserterSub3.IS3OptionsPerInstructions, [IS3SitmaQty]+[IS3BenchQty]+[IS3BinderyQty]+[IS3OutworkQty] AS Total
FROM (tblCostingMain INNER JOIN tblInserterMain ON tblCostingMain.CMID=tblInserterMain.ICMID) INNER JOIN tblInserterSub3 ON tblInserterMain.IID=tblInserterSub3.IID
WHERE (((tblCostingMain.CMJobNo)=[Enter Job Number]) AND (([IS3SitmaQty]+[IS3BenchQty]+[IS3BinderyQty]+[IS3OutworkQty])>0));
|