They are useful - but not win this case as Booth's json was valid - and because Scott's examples don't show what the json looks like you can't learn from it in terms of formulatting the SQL to process it.

I think I'll write to Scott and suggest he add the JSON detail as a comment.



On Nov 15, 2019, at 4:43 PM, Bryan Dietz <bdietz400@xxxxxxxxx> wrote:

I've not digested exactly what is happening, but Scott Forstie has a repository on github for SQL snippets.

https://gist.github.com/forstie

He has one that talks about json shredding
https://gist.github.com/forstie/b45fd2cd06e5103aee6fe52d63f9f628
"JSON_TABLE and survival tips for shredding JSON with SQL"


maybe it helps

Bryan


Jon Paris wrote on 11/15/2019 1:28 PM:
I played around with it Booth - once I had the format of the json - but could not get it to work. There are some real oddball things in SQL Json processing that I can't get my head around.
I don't believe it is the httpgetclob that gives you a problem because if you just feed the json into json_table like I did below I could still not get int to work. Is it possible that the form of this particular array data is one of the edge cases that SQL cannot handle? I don't know.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.