SELECT DISTINCT Invoice.InvNo, Invoice.OrderNo, Part.PartNo, orders.orddate AS Order_Date, Invoice.InvDate AS Bill_Date, MiscChg.Descr, MiscChg.RegFee, Invoice.InvAmt, Orders.ClaimNo, Firm.FirmName AS Ordering_Firm, oppatty.attyid(WHERE oppatty.attyfor = 13), Location.Name1 AS Location
The bolded section is the part I'm having trouble with. I know what I have isn't right, but it demonstrates what I would like to accomplish. In the oppatty table, there could be several items listed. I want it to only display "AttyID for the entry that has an ATTYFOR = 13".
Hope this make sense, thanks
Jack
Aucun commentaire:
Enregistrer un commentaire