ECC Lease Contracts, Lease Receipt Allocations, SQL1

Description
Columns: Ecc Spec Id, Cash Receipt Id, Receipt Number, Allocated Amount, Allocated Line Amount, Allocated Tax Amount, Applied Line Amount, Applied Tax Amount, Allocated Line Balance, Allocated Tax Balance ...
Imported from ECC
SELECT * from (SELECT appl.*, process_t.org_id org_id
		   FROM okl_rcpt_allocations_uv appl,
				okl_ecc_process_t process_t
		 WHERE appl.cash_receipt_id = process_t.id
       		   AND language in ('US')
		   AND process_t.incremental_flag = 'N'
		   AND process_t.record_type = 'ARCASHRCPT')
		 PIVOT (max(CURRENCY) as CURRENCY
			  for LANGUAGE in ('US' "US"))