Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

GET Resource handler, method SQL, and simple typed arrays (subcursors)

Olafur TSep 12 2016 — edited Sep 13 2016

Hi,

Is this possible without doing it by hand with pl/sql?

i.e. what I want is to output:

{

  "department": 10,

  "department_name": "Acme explosives",

  "personnel_ids": [1, 2, 3, 4, 5]

}

Instead of

{

  "department": 10,

  "department_name": "Acme explosives",

  "personnel_ids": [{

  "personnel_id": 1

  }, {

  "personnel_id": 2

  }, {

  "personnel_id": 3

  }, {

  "personnel_id": 4

  }, {

  "personnel_id": 5

  }]

}

Which is what happens when you wrap a CURSOR around a subquery,

Thank you

Oli

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 11 2016
Added on Sep 12 2016
5 comments
331 views