Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sibijoseph
Contributor II
Contributor II

ETL | Exists() | Error - Field not found

Hello,

I'm facing an issue while trying to load a table which has Exists() condition for date field.

These are the scripts that I tried with:

1.

JOIN [CRE_CNC_COMPL]:
LOAD
      Date([DAY_DT],'YYYY-MM-DD') as [CREATION_DATE],
      [SYW_NO] as [CREATION_WEEK],
      [FY_NO] as [CREATION_YEAR]
WHERE EXISTS([CREATION_DATE], [DAY_DT]);
SELECT
     "DAY_DT",
     "SYW_NO",
     "FY_NO"
FROM "ECOMTEST"."DAY_DT" ;

2.

JOIN [CRE_CNC_COMPL]:
LOAD
      Date([DAY_DT],'YYYY-MM-DD') as [CREATION_DATE],
      [SYW_NO] as [CREATION_WEEK],
      [FY_NO] as [CREATION_YEAR];
SELECT
     "DAY_DT",
     "SYW_NO",
     "FY_NO"
FROM "ECOMTEST"."DAY_DT"
WHERE EXISTS("DAY_DT");

 

Please note - Here the table name is 'DAY_DT' as well as one of the fields in the table is also 'DAY_DT'.

 

On trying to load with the above scripts, this is the error message that I'm shown:

ETLquery1.PNG

 

Let me know if any additional details are required.

 

Labels (1)
1 Solution

Accepted Solutions
sibijoseph
Contributor II
Contributor II
Author

I found the answer for my query, hope it helps someone.

 

JOIN [CRE_CNC_COMPL]:
LOAD
     Date([DAY_DT],'YYYY-MM-DD') as [CREATION_DATE],
     [SYW_NO] as [CREATION_WEEK],
     [FY_NO] as [CREATION_YEAR]
WHERE Exists([CREATION_DATE], [DAY_DT]);
SELECT
     "DAY_DT",
     "SYW_NO",
     "FY_NO"
FROM "ECOMTEST"."DAY_DT"
WHERE DAY_DT >= to_date('2017-09-01', 'YYYY-MM-DD') and DAY_DT < to_date('2020-09-01', 'YYYY-MM-DD');

View solution in original post

1 Reply
sibijoseph
Contributor II
Contributor II
Author

I found the answer for my query, hope it helps someone.

 

JOIN [CRE_CNC_COMPL]:
LOAD
     Date([DAY_DT],'YYYY-MM-DD') as [CREATION_DATE],
     [SYW_NO] as [CREATION_WEEK],
     [FY_NO] as [CREATION_YEAR]
WHERE Exists([CREATION_DATE], [DAY_DT]);
SELECT
     "DAY_DT",
     "SYW_NO",
     "FY_NO"
FROM "ECOMTEST"."DAY_DT"
WHERE DAY_DT >= to_date('2017-09-01', 'YYYY-MM-DD') and DAY_DT < to_date('2020-09-01', 'YYYY-MM-DD');