xtract.nominal_accounts.sql 824 B

12345678910111213141516171819202122232425262728
  1. SET QUOTED_IDENTIFIER ON
  2. GO
  3. SET ANSI_NULLS ON
  4. GO
  5. CREATE VIEW [xtract].[nominal_accounts] AS
  6. SELECT [client_db]
  7. , [subsidiary_to_company_ref]
  8. , [nominal_account_number]
  9. , [account_description]
  10. -- , [is_profit_loss_account]
  11. -- , [vat_key]
  12. -- , [create_date]
  13. -- , [create_employee_number]
  14. -- , [oldest_accountable_month]
  15. , right('0000' + convert(varchar(10), [nominal_account_number]), 4) AS [Konto_Nr]
  16. , right('0000' + convert(varchar(10), [nominal_account_number]), 4) + ' - ' + [account_description] AS [Konto_Bezeichnung]
  17. , iif(([is_profit_loss_account] = 'J'), '2', '1') AS [GuV_Bilanz]
  18. , left(convert(varchar(10), [nominal_account_number]), 1) AS [Susa]
  19. FROM [LOCOSOFT].[dbo].[nominal_accounts]
  20. GO
  21. SET QUOTED_IDENTIFIER OFF
  22. GO
  23. SET ANSI_NULLS OFF
  24. GO
  25. GO