OP_aus_LOC_Belege_8520.sql 646 B

12345678910111213
  1. select distinct T1."document_type" as "Document Type",
  2. T1."nominal_account_number" as "Nominal Account Number",
  3. T1."customer_contra_account" as "Customer Contra Account",
  4. T1."invoice_number" as "Invoice Number",
  5. T1."skr51_branch" as "Skr51 Branch",
  6. '1' as "Rechtseinheit",
  7. '0' + (convert(varchar(50), T1."skr51_branch")) as "Betrieb",
  8. '1' as "Mandant",
  9. '1' as "Hauptbetrieb",
  10. ('0' + (convert(varchar(50), T1."skr51_branch"))) as "Standort"
  11. from "journal_accountings" T1
  12. where ((T1."nominal_account_number" IN (8520)) and (T1."document_type" = 'R'))
  13. -- order by "Invoice Number" asc,"Nominal Account Number" asc