Missmatch Error when running sql query on databricks

lee

I am trying to run a simple sql query on databricks and I am getting mismatch errors. I not sure how to resolve this

sample data

sample data

my code:

%sql
select UnitPrice, InvoiceDate
from tester2
where InvoiceDate = 2010-01-12

error

Error in SQL statement: AnalysisException: cannot resolve '(tester2.`InvoiceDate` = ((2010 - 
1) - 12))' due to data type mismatch: differing types in '(tester2.`InvoiceDate` = ((2010 - 1) 
- 12))' (date and int).; line 3 pos 6;
'Project ['UnitPrice, 'InvoiceDate]
eshirvana

datetime and date data types values should be quoted in single quotes :

select UnitPrice, InvoiceDate
from tester2
where InvoiceDate = '2010-01-12'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Error when running a sub query in Oracle SQL

PySpark Error When running SQL Query

Error when running a query involving ROUND function in spark sql

Error in running SQL Query in PHPmyadmin

'Type missmatch' error when using StringChange in Inno Setup

Error when running SQL syntax

SQL Syntax Error when running through PHP but runs fine as an SQL Query

Need help on Databricks SQL query

Databricks : Equivalent code for SQL query

Error when running query in backand: not a valid constant

1093 error when running mysql query

Changing the values of a table when running SQL query

SQL Browser Crashing when running a Nested Query

getting Call to a member function prepare() on null error when running SQL query in php and then printing out the results

Cast error (Type constraint missmatch)

spark sql error when running correlated subquery

sql syntax error when running script

Azure Databricks SQL download query results

Query sql server table in azure databricks

How to use python variable in SQL Query in Databricks?

Using PYODBC to execute query on Azure SQL in Databricks

'ER_PARSE_ERROR' When running Query within node MYSQL

syntax error at or near ":" when running parametrized query from shell

Syntax Error 3075 when running pre-built query in Access

MySQL Error 1064 (42000) when running UPDATE query

Syntax Error running a Visual Basic SQL query in MS Access

Undefined variable: error while running the raw sql query

Invalid identifier error while running SQL query in ireport designer

Update query in SQL, syntax error while running on java