GL_SETS_OF_BOOKS 账簿表

SET_OF_BOOKS_ID 账簿ID

NAME账簿名称

CHART_OF_ACCOUNTS_ID 账簿科目体系ID

 

-- 单位OU与帐簿SOB关系。一个帐簿可对多个单位

-- 一个单位可在多个帐簿

SELECT sob.name sob_name,

count(sob.name) over(partition by sob.name order by sob.name) sob_qty,

hou.name ou_name

FROM hr_all_organization_units hou,

hr_organization_information hoi,

gl_sets_of_books sob

WHERE 1 = 1

AND hou.organization_id = hoi.organization_id

AND hoi.org_information_context = 'Operating Unit Information'

AND sob.set_of_books_id = hoi.org_information3

GL_SETS_OF_BOOKS 帐簿表_Oracle