|
select gs.short_name 公司,
gc.segment1 || '.' || gc.segment2 || '.' || gc.segment3 || '.' ||
gc.segment4 || '.' || gc.segment5 || '.' || gc.segment6 科目,
g.period_name 期間,
g.effective_date 日期,
gj.name 批次,
gjh.je_category 分錄分類,
gjh.je_source 分錄來源,
gjh.doc_sequence_value 文件編號,
gjh.currency_code 幣別 ,
g.entered_dr 原幣借方,
g.entered_cr 原幣貸方,
g.accounted_dr 本幣借方,
g.accounted_cr 本幣貸方,
g.description 摘要
from gl.gl_sets_of_books gs,
gl.gl_je_batches gj,
gl.gl_je_headers gjh,
gl.gl_je_lines g,
gl.gl_code_combinations gc
where gs.set_of_books_id=gj.set_of_books_id
and gj.je_batch_id = gjh.je_batch_id
and gjh.je_header_id = g.je_header_id
and g.code_combination_id = gc.code_combination_id
--and gc.segment3 = '1111'
and to_char(g.effective_date,'yyyy/mm/dd') between '2005/01/01' and '2005/12/31'
and gs.short_name=' ' ---公司別
如何具体添加一個描述科目意思的SQL呢?
看到gcc表跟FND_ID_FLEX_STRUCTURES相關聯,但是還是不能直接連接上,難道必須要象前面兩位高手用函數得出來嗎? |
|