Survey banner
The Dataiku Community is moving to a new home! Some short term disruption starting next week: LEARN MORE

Where Clause SQL - DSS condition is a column

nshapir2
Level 2
Where Clause SQL - DSS condition is a column

I have this query set up:

SELECT *
FROM "dbo"."Table"
where "COLUMN = "Value"

 

I get this  Validation failed: Query failed: Invalid column name 'Value'.

Why does the DSS think I am saying where column = column

0 Kudos
1 Reply
ZachM
Dataiker

Hi @nshapir2,

Because 'Value' is a string literal, it needs to be enclosed in 'single quotes', not "double quotes".

SELECT *
FROM "dbo"."Table"
where "COLUMN" = 'Value'

For details, please see the following question: https://stackoverflow.com/q/1992314

0 Kudos