Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT
- AUFTRAGSNUMMER AS "Order number",
- FAKTURANR AS "Invoice number",
- FAKTURADATUM AS "Invoice date",
- FAKTURASUMME AS "Invoice price",
- ISOWAEHRUNGSCODE AS "Currency",
- SKUNDEN.NAME1 AS "Invoice receiver",
- TOURNUMMER AS "Tour number",
- CONCAT(CONCAT(ATOUR.LKWKZ, '/') ,ATOUR.ANHAENGERKZ) AS "Truck and Trailer number",
- VONLADEDATUM AS "Loading date",
- VONLIEFERDATUM AS "Unloading date"
- FROM
- AKOPF
- LEFT JOIN
- ASENDUNG ON AKOPF.NR = ASENDUNG.AKOPFNR
- LEFT JOIN
- ASDGABRECHNUNG ON ASENDUNG.SENDUNGID = ASDGABRECHNUNG.ASENDUNGID
- LEFT JOIN
- AFAKTURA ON AFAKTURA.IDAFAKTURA = ASDGABRECHNUNG.FK_IDAFAKTURA
- LEFT JOIN
- SWAEHRUNG ON SWAEHRUNG.ID = AFAKTURA.WAEHRUNGID
- LEFT JOIN
- SKUNDEN ON SKUNDEN.NR = AFAKTURA.FAKTURAPARTNER
- LEFT JOIN
- ATASEND ON ASENDUNG.SENDUNGID = ATASEND.ASENDUNGID
- LEFT JOIN
- ATOUR ON ATOUR.NR = ATASEND.TOURNR
- WHERE
- FAKTURANR IS NOT NULL AND AUFTRAGSNUMMER IN (867315, 851463, 849229, 849692, 851585, 850456, 851610, 849242, 851213, 849694)
- ORDER BY
- AUFTRAGSNUMMER;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement