Netezza Performance Server

Netezza Performance Server

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only

Parse JSON String via SELECT Statement.

  • 1.  Parse JSON String via SELECT Statement.

    Posted Wed August 24, 2022 08:32 AM
    Edited by System Admin Fri January 20, 2023 04:44 PM
    How would I parse the following JSON into two columns - country_code and country_name?:


    Here is the Netezza code in text format:

    WITH
    NATIONALITIES_JSON AS (
    SELECT '
    [
    [ "AG", "Argentinian" ], [ "AR", "Armenian" ]
    ]
    ' as json_text
    )

    SELECT *
    FROM NATIONALITIES_JSON

    Here is how I would parse the JSON string in Oracle:


    I am on release 7.2.1.11 [Build 5] of Netezza.

    Thank you all.   

    ------------------------------
    David Briars
    ------------------------------
    #NetezzaPerformanceServer