Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

Field not found error in resident load

hi,

For the following script I am getting field not found error:

[Max_Dim_time]:
load date(floor(max("UPD_TS")), 'DD/MM/YYYY') as "Max_Upd_Time" resident [Dim_Office_Updated_Date] order by "Max_Upd_Time" DESC;

I have traced that for this portion of code : order by "Max_Upd_Time" DESC i am getting error.

Please help me for this.

Thanks,

Sandip

1 Solution

Accepted Solutions
tresesco
MVP
MVP

You can't use a field in the Order By clause which is being created in the same load. Try creating your "Max_Upd_Time" field in the previous load and then try like:

[Dim_Office_Updated_Date]:
load           [UPD_TS],

               date(floor(max("UPD_TS")), 'DD/MM/YYYY') as "Max_Upd_Time"

from $(vExtractPathName)\Dim_Office.qvd(qvd);


[Max_Dim_time]:

Order

load "Max_Upd_Time"

resident [Dim_Office_Updated_Date] order by "Max_Upd_Time" DESC;

View solution in original post

3 Replies
Anil_Babu_Samineni

Can you send full script. I mean before resident load file

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ananyaghosh
Creator III
Creator III
Author

[Dim_Office_Updated_Date]:
load [UPD_TS] from $(vExtractPathName)\Dim_Office.qvd(qvd);

[Max_Dim_time]:
load date(floor(max("UPD_TS")), 'DD/MM/YYYY') as "Max_Upd_Time" resident [Dim_Office_Updated_Date] order by "Max_Upd_Time" DESC;

tresesco
MVP
MVP

You can't use a field in the Order By clause which is being created in the same load. Try creating your "Max_Upd_Time" field in the previous load and then try like:

[Dim_Office_Updated_Date]:
load           [UPD_TS],

               date(floor(max("UPD_TS")), 'DD/MM/YYYY') as "Max_Upd_Time"

from $(vExtractPathName)\Dim_Office.qvd(qvd);


[Max_Dim_time]:

Order

load "Max_Upd_Time"

resident [Dim_Office_Updated_Date] order by "Max_Upd_Time" DESC;