0% found this document useful (0 votes)
16 views

Project Event Data Extract

This document contains a long SQL query that extracts data from a JSON response. The SQL query uses JSON_TABLE to extract fields from a JSON response and output them as columns in a table.

Uploaded by

sankalpthakur123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Project Event Data Extract

This document contains a long SQL query that extracts data from a JSON response. The SQL query uses JSON_TABLE to extract fields from a JSON response and output them as columns in a table.

Uploaded by

sankalpthakur123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SELECT jt.

*
FROM
(
JSON_TABLE ( ( xxtgf_rest_get_call('https://fa-enmo-dev2-
saasfaprod1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/projectBil
lingEvents?limit=500') )
,'$'
COLUMNS (
get_count NUMBER PATH '$.count',
NESTED PATH '$.items[*]' columns
(EventId number path '$.EventId',
SourceName varchar2(240) path '$.SourceName',
SourceReference varchar2(240) path
'$.SourceReference',
ContractNumber varchar2(240)
path '$.ContractNumber',
ContractLineNumber varchar2(240) path
'$.ContractLineNumber',
EventNumber varchar2(240) path '$.EventNumber',
OrganizationName varchar2(240) path
'$.OrganizationName',
EventTypeName varchar2(240) path
'$.EventTypeName',
EventDescription varchar2(240) path
'$.EventDescription',
RevenueHold varchar2(240) path '$.RevenueHold',
BillHold varchar2(240) path '$.BillHold',
ProjectNumber varchar2(240) path
'$.ProjectNumber',
TaskNumber varchar2(240) path '$.TaskNumber',
BillTrnsAmount number path '$.BillTrnsAmount',
BillTrnsCurrencyCode varchar2(240) path
'$.BillTrnsCurrencyCode',
ContractCurrencyCode varchar2(240) path
'$.ContractCurrencyCode',
ContractCurrencyAmount number path
'$.ContractCurrencyAmount',
ContractCurrencyExchgRate number path
'$.ContractCurrencyExchgRate',
Invoiced varchar2(240) path '$.Invoiced',
InvoiceCurrencyCode varchar2(240) path
'$.InvoiceCurrencyCode',
InvoicedAmount number path '$.InvoicedAmount',
InvoicedPercentage varchar2(240) path
'$.InvoicedPercentage',
RevenueRecognized varchar2(240) path
'$.RevenueRecognized',
RevenueRecognizedPercentage varchar2(240) path
'$.RevenueRecognizedPercentage',
RevenueAmount number path '$.RevenueAmount',
LedgerCurrencyCode varchar2(240) path
'$.LedgerCurrencyCode',
LedgerRevenueAmount number path
'$.LedgerRevenueAmount',
LedgerInvoiceAmount number path
'$.LedgerInvoiceAmount'
)
)
)
) jt
WHERE 1 = 1;

You might also like