CMF_LELRU_TAXPAYER_INFO_V

Details

  • Schema: FUSION

  • Object owner: CMF

  • Object type: VIEW

Columns

Name

REGISTRATION_ID

LEDGER_ID

LEGAL_ENTITY_ID

LEGAL_ENTITY_NAME

ESTABLISHMENT_ID

ESTABLISHMENT_NAME

TAXPAYER_ID

FORMATTED_TAXPAYER_NUMBER

PARTY_ID

REGISTRATION_CODE_LE

IDENTIFYING_FLAG

LOCATION_ID

ADDRESS1

ADDRESS2

ADDRESS3

ADDRESS4

CITY

STATE

COUNTRY

POSTAL_CODE

FORMATTED_ADDRESS

CURRENCY_CODE

Query

SQL_Statement

select lru.registration_id

,gl.ledger_id

,gl.legal_entity_id

,gl.legal_entity_name

,etb.establishment_id

,etb.name establishment_name

,lru.registration_number taxpayer_id

,lpad(lru.registration_number,14,'0') formatted_taxpayer_number

,etb.party_id

,jur.registration_code_le

,lru.identifying_flag

,hl.location_id

,hl.address1

,hl.address2

,hl.address3

,hl.address4

,hl.city city

,hl.state state

,hl.country

,hl.postal_code

,replace(replace(hl.address1||', '||hl.address2||', '||hl.address3||', '||hl.address4||', '||hl.city||', '||hl.state||', '||hl.country||', '||hl.postal_code,',,',','),', ,',',')

,gl.currency_code

from xle_registrations lru

,xle_etb_profiles etb

, hz_locations hl

,xle_jurisdictions_vl jur

,gl_ledger_le_v gl

where etb.legal_entity_id = gl.legal_entity_id

and lru.source_id = etb.establishment_id

and lru.source_table = 'XLE_ETB_PROFILES'

and gl.ledger_category_code = 'PRIMARY'

and hl.location_id = lru.location_id

and jur.jurisdiction_id = lru.jurisdiction_id

and trunc(sysdate) between nvl(lru.effective_from,trunc(sysdate)-1) and nvl(lru.effective_to,trunc(sysdate)+1)