Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
schuffe
Contributor III
Contributor III

Field not found

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

5 Replies
mfchmielowski
Creator II
Creator II

Hi.

Have you tried syntax:

WHERE YEAR([DATE_FIELD] ) = 2021;

JuanGerardo
Partner - Specialist
Partner - Specialist

Have you tried?

[TABLE]:
LOAD [DATE_FIELD];
SQL SELECT "DATE_FIELD"
FROM "..."."..."

WHERE YEAR(DATE_FIELD) = 2021;

JG

schuffe
Contributor III
Contributor III
Author

Hi, thanks for your response.

I tried both versions but it still the same error.

mfchmielowski
Creator II
Creator II

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. 

kiranmanoharrode
Creator III
Creator III

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;