Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT AUFTRAGSNUMMER AS "Order number",
- to_char(akopf.ts_creation, 'dd.mm.yyyy') "Order Created",
- SHI.NR AS "Organisation number",
- SH.NR AS "Invoice organisation",
- VONLADEDATUM AS "Loading date from",
- BISLADEDATUM AS "Loading date until",
- VONLIEFERDATUM AS "Unloading date from",
- BISLIEFERDATUM AS "Unloading date until"
- FROM akopf
- JOIN SHIERARCHIE SHI ON SHI.ID = AKOPF.HIERARCHIE
- JOIN ASENDUNG ON AKOPF.NR = ASENDUNG.AKOPFNR
- JOIN ATASEND ON ASENDUNG.SENDUNGID = ATASEND.ASENDUNGID
- JOIN SHIERARCHIE SH ON SH.ID = AKOPF.ALTHIERARCHIE
- WHERE akopf.inrecyclebin=0 AND (ATASEND.VONLADEDATUM IS NULL OR ATASEND.BISLADEDATUM IS NULL OR ATASEND.VONLIEFERDATUM IS NULL OR ATASEND.BISLIEFERDATUM IS NULL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement