2023-01-11

[Oracle]檢查年度開帳資料

SELECT FDS.DB_SEQUENCE_NAME,
       FDSA.SET_OF_BOOKS_ID,
       SOB.NAME,
       FDS.DOC_SEQUENCE_ID,
       FAT.APPLICATION_NAME,
       FDS.NAME,
       FDS.START_DATE,
       FDS.END_DATE,
       FDS.INITIAL_VALUE,
       FDSA.DOC_SEQUENCE_ASSIGNMENT_ID,
       FDSC.NAME,
       FDSA.START_DATE,
       FDSA.END_DATE
  FROM FND_DOCUMENT_SEQUENCES       FDS,
       FND_DOC_SEQUENCE_ASSIGNMENTS FDSA,
       FND_DOC_SEQUENCE_CATEGORIES  FDSC,
       FND_APPLICATION_TL           FAT,
       GL_SETS_OF_BOOKS             SOB
 WHERE 1 = 1
   AND FDS.DOC_SEQUENCE_ID = FDSA.DOC_SEQUENCE_ID(+)
   AND FDSA.CATEGORY_CODE = FDSC.CODE(+)
   AND FDS.APPLICATION_ID = FAT.APPLICATION_ID(+)
   AND FAT.SOURCE_LANG = 'ZHT'
   AND FDSA.SET_OF_BOOKS_ID = SOB.SET_OF_BOOKS_ID(+)
   AND TO_CHAR(FDS.START_DATE, 'YYYY') = '2023'
   --AND FDS.NAME = 'ACETJ_OM_1031012_23'
 ORDER BY FDSA.SET_OF_BOOKS_ID, FAT.APPLICATION_NAME

沒有留言:

張貼留言