Pros,
I have to find a mismatch on a table where the BOM Op Sequence doesn’t equal the WO Op Sequence. I am using a left join to itself with the is null thing I thought was logical. Please help.
Here is the SQL:
SELECT tblOutputDataFS.Username, tblOutputDataFS.OpSeqBOM, tblOutputDataFS.OpSeqWO, tblOutputDataFS.PartNumber, tblOutputDataFS.Description, tblOutputDataFS.StockType, tblOutputDataFS.GLClass, tblOutputDataFS.BOMRev, tblOutputDataFS.PLRev, tblOutputDataFS.BomQty, tblOutputDataFS.PLQty, tblOutputDataFS.Delta, tblOutputDataFS.RevMismatch, tblOutputDataFS.QtyMismatch, tblOutputDataFS.SalesOrder, tblOutputDataFS.ITM, tblOutputDataFS.WORKORDER, tblOutputDataFS.OpMismatch
FROM tblOutputDataFS LEFT JOIN tblOutputDataFS AS tblOutputDataFS_1 ON (tblOutputDataFS.OpSeqWO = tblOutputDataFS_1.OpSeqWO) AND (tblOutputDataFS.OpSeqBOM = tblOutputDataFS_1.OpSeqBOM) AND (tblOutputDataFS.PartNumber = tblOutputDataFS_1.PartNumber) AND (tblOutputDataFS.WORKORDER = tblOutputDataFS_1.WORKORDER)
WHERE (((tblOutputDataFS_1.OpSeqBOM) Is Null)) OR (((tblOutputDataFS_1.OpSeqWO) Is Null));
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar