on ‎2020 May 05 4:54 AM
Is there any equivalent to the OPENXML operator for the case of JSON?
I looked in the documentation for something like OPENJSON but couldn't find!!
Any ideas please?
Request clarification before answering.
But at the end it worked! I only needed to add parentheses.
begin
declare json_data long varchar;
set json_data = '{"id":10, "Product_Name":"testname", "Product_Colors":{"color":"white", "background":"black"}}';
call sp_parse_json ('sql_array', json_data);
select (sql_array.Product_Colors).color;
end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.