Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone, I have the following problem:
[TABLE]:
LOAD [DATE_FIELD];
SELECT "DATE_FIELD"
FROM "..."."...";
is working, but if I change it to
[TABLE]:
LOAD [DATE_FIELD];
SELECT "DATE_FIELD"
FROM "..."."..."
WHERE YEAR(DATE_FIELD) = 2021;
I am getting the error "Field 'DATE_FIELD' not found"
Does anyone know what is going on and how I can fix it ?
Cheers
Hi.
Have you tried syntax:
WHERE YEAR([DATE_FIELD] ) = 2021;
?
Have you tried?
[TABLE]:
LOAD [DATE_FIELD];
SQL SELECT "DATE_FIELD"
FROM "..."."..."
WHERE YEAR(DATE_FIELD) = 2021;
JG
Hi, thanks for your response.
I tried both versions but it still the same error.
Hi.
What is your source? From the syntax i think that this is some kind of sql. Check your query in sql client, maybe there you'll find what is wrong.
Hi,
Try executing below syntax on a database. Year function must be used as per database.
May be datefield has 'Text' data type. So you may need to use convert or other SQL functions.
SELECT "DATE_FIELD"
FROM "..."."..."
WHERE YEAR(DATE_FIELD) = 2021;