I have created a stored procedure which gets certain values from a table and uses those values into another sql query I successfully got the values I needed however I keep getting invalid identifier for the values I pass through binding Below is a snippet of my code
var v_role = sqlRS1.getColumnValue(1);
var v_database = sqlRS1.getColumnValue(2);
var v_schema = sqlRS1.getColumnValue(3);
var v_table = sqlRS1.getColumnValue(4);
var v_column = sqlRS1.getColumnValue(5);
var v_tableColumn = v_table + `_` + v_column;
var v_sqlCode5 = `SELECT *
FROM db.sch.tbl
WHERE DATABASE_NAME = identifier(?)
AND SCHEMA_NAME = identifier(?)
AND POLICY_NAME IN (identifier(?))`;
var sqlStmt2 = snowflake.createStatement({sqlText:v_sqlCode5,binds:[v_database,v_schema,v_tableColumn]});
var sqlRS2 = sqlStmt2.execute();
the error will say that there is invalid identifier for the value passed in DATABASE_NAME I checked the query history and I see that the value passed is correct So I am unsure of how to solve this, any help would be greatly appreciated