test.Belege_SKR_STK.sql 458 B

1234567891011121314151617181920
  1. SET QUOTED_IDENTIFIER ON
  2. GO
  3. SET ANSI_NULLS ON
  4. GO
  5. CREATE VIEW [test].[Belege_SKR_STK] AS
  6. SELECT year([Invoice_Date]) AS [Jahr]
  7. , [Rechtseinheit_ID]
  8. , [Betrieb_ID]
  9. , [Acct_Nr]
  10. , [Fabrikat]
  11. , convert(decimal(10, 0), round(sum([Menge]), 0)) AS [Menge]
  12. FROM [transform].[Belege_SKR_STK]
  13. GROUP BY year([Invoice_Date]), [Rechtseinheit_ID], [Betrieb_ID], [Acct_Nr], [Fabrikat]
  14. GO
  15. SET QUOTED_IDENTIFIER OFF
  16. GO
  17. SET ANSI_NULLS OFF
  18. GO
  19. GO