Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a) без филтриране по INFO1
- SELECT
- AUFTRAGSNUMMER AS "Order number",
- DATUMAEXTERN AS "Order date created",
- KUNDENNR AS "BP number",
- NAME1 AS "Name of the client",
- MAINLAND AS "Country of the client",
- BSBELADESTART AS "Loading date start",
- BSBELADEEND AS "Loading date end",
- ESENTLADESTART AS "Unloading date start",
- ESENTLADEEND AS "Unloading date end",
- ABS_ORT1 AS "Loading City",
- EMP_ORT1 AS "Unloading City"
- FROM
- AKOPF
- LEFT JOIN
- SKUNDEN ON SKUNDEN.NR = AKOPF.FRACHTAGNR
- LEFT JOIN
- ASENDUNG ON AKOPF.NR = ASENDUNG.AKOPFNR;
- б) Полето INFO1 не е празно и не съдържа само space-ове
- SELECT
- AUFTRAGSNUMMER AS "Order number",
- DATUMAEXTERN AS "Order date created",
- KUNDENNR AS "BP number",
- NAME1 AS "Name of the client",
- MAINLAND AS "Country of the client",
- BSBELADESTART AS "Loading date start",
- BSBELADEEND AS "Loading date end",
- ESENTLADESTART AS "Unloading date start",
- ESENTLADEEND AS "Unloading date end",
- ABS_ORT1 AS "Loading City",
- EMP_ORT1 AS "Unloading City"
- FROM
- AKOPF
- LEFT JOIN
- SKUNDEN ON SKUNDEN.NR = AKOPF.FRACHTAGNR
- LEFT JOIN
- ASENDUNG ON AKOPF.NR = ASENDUNG.AKOPFNR
- WHERE
- TRIM(ASENDUNG.INFO1) <> ' ';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement