X
Xata2w 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
tsg2w ago
this seems to generally work for me
No description
tsg
tsg2w 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
qwame2w ago
No description
qwame
qwame2w ago
I got this in the Queries playground I guess CTEs are not supported
Want results from more Discord servers?
Add your server