Advertisement
horozov86

Task 10 - SQL

Oct 2nd, 2024 (edited)
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.70 KB | None | 0 0
  1. SELECT AUFTRAGSNUMMER AS "Order number",
  2. to_char(akopf.ts_creation, 'dd.mm.yyyy') "Order Created",
  3. SHI.NR AS "Organisation number",
  4. SH.NR AS "Invoice organisation",
  5. VONLADEDATUM AS "Loading date from",
  6. BISLADEDATUM AS "Loading date until",
  7. VONLIEFERDATUM AS "Unloading date from",
  8. BISLIEFERDATUM AS "Unloading date until"
  9.  
  10. FROM akopf
  11. JOIN SHIERARCHIE SHI ON SHI.ID = AKOPF.HIERARCHIE
  12. JOIN ASENDUNG ON AKOPF.NR = ASENDUNG.AKOPFNR
  13. JOIN ATASEND ON ASENDUNG.SENDUNGID = ATASEND.ASENDUNGID
  14. JOIN SHIERARCHIE SH ON SH.ID = AKOPF.ALTHIERARCHIE
  15.  
  16. 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