Home » SQL & PL/SQL » SQL & PL/SQL » JSON parsing? (12c)
JSON parsing? [message #635475] Mon, 30 March 2015 16:26 Go to next message
JDOaktown
Messages: 7
Registered: March 2015
Junior Member
Here is my JSON stored in a CLOB column:

select upJSON from myLocations;

{"values":[
{"nameValuePairs":{"upJSON":"{\"mResults\":[0.0,0.0],\"mProvider\":\"fused\",\"mDistance\":0.0,\"mAltitude\":0.0}","id":"1","updated":"2015-03-30 20:28:51"}},
{"nameValuePairs":{"upJSON":"{\"mResults\":[0.0,0.0],\"mProvider\":\"FINDME\",\"mDistance\":0.0,\"mAltitude\":22.2}","id":"2","updated":"2015-03-30 20:28:53"}},
{"nameValuePairs":{"upJSON":"{\"mResults\":[0.0,0.0],\"mProvider\":\"fused\",\"mDistance\":0.0,\"mAltitude\":0.0}","id":"3","updated":"2015-03-30 20:28:55"}},
{"nameValuePairs":{"upJSON":"{\"mResults\":[0.0,0.0],\"mProvider\":\"fused\",\"mDistance\":0.0,\"mAltitude\":0.0}","id":"4","updated":"2015-03-30 20:28:57"}}
]}     



(I have inserted newlines for clarity)

Please: What is the SQL (or PL/SQL) needed to select just the value of mProvider, mAltitude, and the id from the 2nd "nameValuePairs" (= "FINDME" and 22.2 and "2") in the example above) ??
Re: JSON parsing? [message #635484 is a reply to message #635475] Tue, 31 March 2015 00:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

What did you try before posting this question?

Re: JSON parsing? [message #635485 is a reply to message #635484] Tue, 31 March 2015 00:49 Go to previous messageGo to next message
JDOaktown
Messages: 7
Registered: March 2015
Junior Member
u stupid amerikahn: ah dunaught unnnerstan uh.....?
Re: JSON parsing? [message #635486 is a reply to message #635485] Tue, 31 March 2015 00:52 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
LOL! Since when is someone, whose location is "Nanterre, France", a stupid amerikahn?

Mind your language. Such an attitude doesn't guarantee your long and prosper life on OraFAQ forum.
Re: JSON parsing? [message #635488 is a reply to message #635486] Tue, 31 March 2015 01:05 Go to previous messageGo to next message
JDOaktown
Messages: 7
Registered: March 2015
Junior Member
A) MY QUESTION REMAINS UNANSWERED.

B) U ARE COMPLETELY FUCKING CLUELESS AND HAVE NO SENSE OF HUMOUR.

C) GO GOAT YOURSELF AHOLE.
Re: JSON parsing? [message #635490 is a reply to message #635488] Tue, 31 March 2015 01:09 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Banned.
Re: JSON parsing? [message #635498 is a reply to message #635486] Tue, 31 March 2015 01:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Littlefoot wrote on Tue, 31 March 2015 07:52
LOL! Since when is someone, whose location is "Nanterre, France", a stupid amerikahn?


As his IP is from Oakland, CA, USA, I think he is talking about him. Laughing

[Updated on: Tue, 31 March 2015 01:53]

Report message to a moderator

Re: JSON parsing? [message #635501 is a reply to message #635490] Tue, 31 March 2015 02:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Littlefoot wrote on Tue, 31 March 2015 08:09
Banned.


And topic locked to prevent from resurgence.

Re: JSON parsing? [message #635534 is a reply to message #635501] Tue, 31 March 2015 12:36 Go to previous messageGo to next message
JDOaktown
Messages: 7
Registered: March 2015
Junior Member
I am very sorry for my rude, offensive, ignorant, drunken behaviour last night.
I have never done that before and I will never do it again.
I don't expect to be forgiven but please know that I apologize and feel terrible about my behaviour.

I am trying to send this to all on that thread.
-JD
"JDOAKTOWN"
Re: JSON parsing? [message #635535 is a reply to message #635534] Tue, 31 March 2015 12:38 Go to previous messageGo to next message
JDOaktown
Messages: 7
Registered: March 2015
Junior Member
I'm so embarrassed. I wish I could delete this whole stupid thread.
Re: JSON parsing? [message #635536 is a reply to message #635535] Tue, 31 March 2015 12:40 Go to previous messageGo to next message
JDOaktown
Messages: 7
Registered: March 2015
Junior Member
Thank you for unbanning me.
Please accept my apology.
-JD
Re: JSON parsing? [message #635537 is a reply to message #635535] Tue, 31 March 2015 12:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You may now get an answer.
In the meantime you can read:
XML DB Developer's Guide
Chapter 39 JSON in Oracle Database

Re: JSON parsing? [message #635538 is a reply to message #635537] Tue, 31 March 2015 12:44 Go to previous message
JDOaktown
Messages: 7
Registered: March 2015
Junior Member
Thank you and, again, I do apologize.
Previous Topic: Select query is hitting the database multiple times
Next Topic: different results of sql query on different servers (with the same data)
Goto Forum:
  


Current Time: Thu May 09 05:32:59 CDT 2024