SQL to get list of ledgers in given Ledger Set in Oracle Fusion

SELECT *
FROM   gl_ledgers
WHERE  ledger_id IN (SELECT glsa.ledger_id
                     FROM   gl_ledger_set_assignments glsa
                     WHERE  glsa.ledger_set_id =
                            (SELECT ledger_id
                             FROM   gl_ledgers
                             WHERE  name = 'Ledger Set Name'
                                    AND ledger_category_code =
                                        'NONE'
                                    AND object_type_code = 'S'))
       AND ledger_category_code = 'PRIMARY' 

Comments