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
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]
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.
Comments