123456789101112131415161718192021 |
- SET QUOTED_IDENTIFIER ON
- GO
- SET ANSI_NULLS ON
- GO
- CREATE VIEW ims.service_nachlass_lohn_auftrag AS
- select T1."Document No_" as "Document No",
- SUM(((convert(float, T1."Line Discount Amount")))) as "Auftrags_Discount_Lohn"
- from "NAVISION"."import"."Archived_Service_Header" T2,
- "NAVISION"."import"."Archived_Service_Line" T1
- where ((T2."No_" = T1."Document No_") and (T2."Client_DB" = T1."Client_DB"))
- and (((((T1."Document No_" LIKE 'WAU%') and (T2."Order Date" >= convert(datetime, '2017-01-01 00:00:00.000'))) and (((convert(float, T1."Line Discount Amount"))) <> 0)) and (T1."Type" = 3)) and (T1."Document No_" <> 'WAU17422406'))
- group by T1."Document No_"
- -- order by "Document No" asc
- GO
- SET QUOTED_IDENTIFIER OFF
- GO
- SET ANSI_NULLS OFF
- GO
- GO
|