Follow us: Subscribe via RSS Feed Connect on YouTube Connect on YouTube

Pages

Tuesday, 10 May 2016

Query To Find GL Journal Header Summary

SELECT   gld.short_name "BOOK", gjh.status, gjh.posted_date,
         gjh.creation_date, gls.user_je_source_name "SOURCE",
         glc.user_je_category_name "CATEGORY", gjh.period_name "PERIOD",
         gjb.NAME "BATCH NAME", gjh.NAME "JOURNAL NAME",
         gjh.currency_code "CURRENCY"
    FROM gl_je_batches gjb,
         gl_je_headers gjh,
         gl_ledgers gld,
         gl_je_sources_tl gls,
         gl_je_categories_tl glc
   WHERE gjb.je_batch_id = gjh.je_batch_id
     AND gjh.ledger_id = gld.ledger_id
     AND gls.je_source_name = gjh.je_source
     AND glc.je_category_name = gjh.je_category
     AND gjh.period_name IN ('MAY-06')                       -- JOURNAL PERIOD
     AND (   TRUNC (gjh.creation_date) >= TO_DATE ('01/07/2005', 'DD/MM/YYYY')
          OR TRUNC (gjh.posted_date) >= TO_DATE ('01/07/2005', 'DD/MM/YYYY')
         )
--AND SUBSTR(GLD.SHORT_NAME,1,2) IN ('DE')

ORDER BY 1, 2 DESC, 3, 4, 5, 7;
Share this article :

0 comments:

Post a Comment