表内の JSON データの更新
JSON2BSON 関数を使用して、表内の JSON データを更新することができます。
プロシージャー
表内の JSON データを更新するには、次のようにします。
- JSON 列から JSON データを照会して取得します。
- JSON 列の内容を変更します。
- 更新した列の値を表にプッシュするには、JSON2BSON 関数を指定して UPDATE SQL ステートメントを実行します。
例
UPDATE CLAIMS SET CALL_RECORDS = SYSTOOLS.JSON2BSON('{"calls": [
{"dateOfCall": "2014-02-26",
"associate": "Steven Barnes",
"conversationNotes": "Customer provided details of accident
and witness contact information. Stated that her local
agent was unavailable."},
{"dateOfCall": "2014-02-29",
"associate": "Paula Garcia",
"conversationNotes": "Client asked about status of the
damage estimate."}],
"satisfactionSurveyResult":"needs improvement" }');