You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, ${uniqueColumns} should be a list of columns to insert data from the select statement but the generated sql statement uses the values syntax.
Typescript:
constuniqueColumns=['uniqueId']awaitsql`INSERT INTO "schema".${stagingRelation}${uniqueColumns} SELECT ${uniqueColumns} FROM "schema".${dataRelation} WHERE col IN ${sql(col)} ON CONFLICT DO NOTHING`;
Generated SQL statement:
INSERT INTO"schema"."table_staging" ("0","1","2","3","4","5","6","7")values($1,$2,$3,$4,$5,$6,$7,$8) SELECT"uniqueId"FROM"schema"."table"WHERE col IN ($9,$10,$11) ON CONFLICT DO NOTHING
Best I can tell this is caused by this line of code. Let me know if there is anything I can do to help.
The text was updated successfully, but these errors were encountered:
In this case,
${uniqueColumns}
should be a list of columns to insert data from the select statement but the generated sql statement uses thevalues
syntax.Typescript:
Generated SQL statement:
Best I can tell this is caused by this line of code. Let me know if there is anything I can do to help.
The text was updated successfully, but these errors were encountered: