Skip to content
When SQL won't run

SQL error messages explained

Paste the error your database gave you, or scan the list below. Each page shows the failing query, runs it in your browser, and explains what the database is telling you.

Other errors you will meet

Two more that come up often enough to cover here, though they have no page of their own yet.

No function matches the given name and argument types

A type mismatch, often from comparing text to a number or passing a string where a date is expected. Cast explicitly with CAST(x AS INTEGER) or fix the literal's quotes.

Conversion error / could not convert

A value could not be coerced to the needed type, for example the text 'N/A' in a numeric column. Filter or clean the bad values first, or guard with TRY_CAST (DuckDB), which returns NULL instead of failing.

If the query runs without complaint and comes back empty, there is nothing here to decode: it succeeded. Read why a query runs but returns no rows instead.

When you get stuck on any of these, rebuild the query in small steps. Start with SELECT * FROM table, add one join, then one filter, checking the result after each change.