X
Xata2mo ago
qwame

Sql over http unused parameters.

I need help using the typescript sdk to pull data using sql.
const my_nam = 'interbro'
const my_date = '2020-04-01'
const result = await xata.sql`SELECT * FROM table WHERE name = ${my_nam} AND date = ${my_date}
const my_nam = 'interbro'
const my_date = '2020-04-01'
const result = await xata.sql`SELECT * FROM table WHERE name = ${my_nam} AND date = ${my_date}
When I run this, I get the error, Invalid SQL: unused parameters: used 1 of 2 parameters. status: 400 Any help?
4 Replies
tsg
tsg2mo ago
this seems to generally work for me
No description
tsg
tsg2mo ago
is the table literarly named "table"? If yes, it requires quoting as "table" otherwise, what are the types for name and date, and can you try running in the Queries playground like the above?
qwame
qwameOP2mo ago
No description
qwame
qwameOP2mo ago
I got this in the Queries playground I guess CTEs are not supported
Want results from more Discord servers?
Add your server