I am trying to store API json value in SQL db.
DO $$
BEGIN
FOR i in 1..10 LOOP
INSERT INTO tableName (columnName) VALUES ('{ "A": "1", "B": {"C": "2","qty": 3}}');
END LOOP;
END; $$
this syntax works but,
DO $$
BEGIN
FOR i in 1..{{text1.value}} LOOP
INSERT INTO tableName (columnName) VALUES ({{query.data[i]}});
END LOOP;
END; $$
this syntax does not work with the following error
* error:true
* message:"bind message supplies 2 parameters, but prepared statement "" requires 0"
* source:"resource"
i think {{text1.value}}, {{query.data[i]}} is the problem. is there any other way to use it?