[ad_1]
I have one requirement wherein I need to pass JSON as an input parameter and process the data accordingly.
JSON data:
{
"Table name": "test_table",
"Column name":["column_1","column_2"],
"Column_value":["test_data","1"]
}
I need to write a procedure with this JSON as an input parameter.
Then based on the table name and column name it should insert the particular column value into the respective columns of a table.
Pseudo Code:
Store JSON in one table with the table structure as
table_id |Table_name | Column_name | Column_value
Then pass table_name, column_name, and column_values JSON format as input parameters.
Then extract tables, columns, and column_value from the input parameter and load in into the respective table.
Will this work? As I am not aware of how to handle JSON in a stored procedure or if anyone has any clue of how to start with this it would help me.
Tool Used: SQL Developer (18c)
[ad_2]