Advertisement
fkeles

json_table.sql

Sep 5th, 2023
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 1.07 KB | Source Code | 0 0
  1. SELECT
  2.     P.CLOUD_IDENTITY,
  3.     JT.*
  4. FROM
  5.     V$PDBS P,
  6.     JSON_TABLE ( P.CLOUD_IDENTITY, '$'
  7.             COLUMNS (
  8.                 DATABASE_NAME VARCHAR2 ( 30 ) PATH '$.DATABASE_NAME',
  9.                 REGION VARCHAR2 ( 300 ) PATH '$.REGION',
  10.                 TENANT_OCID VARCHAR2 ( 300 ) PATH '$.TENANT_OCID',
  11.                 DATABASE_OCID VARCHAR2 ( 300 ) PATH '$.DATABASE_OCID',
  12.                 COMPARTMENT_OCID VARCHAR2 ( 300 ) PATH '$.COMPARTMENT_OCID',
  13.                 OUTBOUND_IP_ADDRESS VARCHAR2(50 CHAR) FORMAT JSON WITH WRAPPER PATH '$.OUTBOUND_IP_ADDRESS[*]',
  14.                 PUBLIC_DOMAIN_NAME VARCHAR2 ( 300 ) PATH '$.PUBLIC_DOMAIN_NAME',
  15.                 TENANT_ACCOUNT_NAME VARCHAR2 ( 300 ) PATH '$.TENANT_ACCOUNT_NAME',
  16.                 INFRASTRUCTURE VARCHAR2 ( 300 ) PATH '$.INFRASTRUCTURE',
  17.                 SERVICE VARCHAR2 ( 300 ) PATH '$.SERVICE',
  18.                 APPLICATIONS VARCHAR2(50 CHAR) FORMAT JSON WITH WRAPPER PATH '$.APPLICATIONS[*]',
  19.                 AVAILABILITY_DOMAIN VARCHAR2 ( 300 ) PATH '$.AVAILABILITY_DOMAIN'
  20.             )
  21.         )
  22.     JT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement