Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Field not found error with load statement

Hello,

I am getting error for below script:

--> script

Table1:

SQL SELECT

          FIELD_A,  

          FIELD_B,

          FIELD_C

FROM .. ;

Table2:

LOAD FIELD_A,

Subfield(FIELD_C, '#', 1) as temp1;

SubField(FIELD_C, '#', 2) as temp2;

LOAD FIELD_A,

Subfield(FIELD_C, '$') as temp3;

LOAD FIELD_A, FIELD_C  

Resident Table1;

-->error

Field not found - <FIELD_C>

LOAD FIELD_A, FIELD_C 

Resident Table1;

Can someone help me with this?

Thank you

Kinjal

3 Replies
Highlighted
Partner
Partner

Re: Field not found error with load statement

Try this

Table2:

LOAD *,

Subfield(FIELD_C, '#', 1) as temp1;

SubField(FIELD_C, '#', 2) as temp2;

//LOAD FIELD_A,

Subfield(FIELD_C, '$', 1) as temp3;

LOAD trace_id,

SubField(metainfo, '$') as Properties;

//LOAD FIELD_A, FIELD_C   

Resident Table1;

Highlighted

Re: Field not found error with load statement

If you look - You are doing Preceding load concept. So, I may look this way where you stuck

Table2:

LOAD FIELD_A,

Subfield(FIELD_C, '#', 1) as temp1;

SubField(FIELD_C, '#', 2) as temp2;

LOAD FIELD_A, FIELD_C

Subfield(FIELD_C, '$', 1) as temp3;

LOAD trace_id,

SubField(metainfo, '$') as Properties; // Where is the FIELD_C comes from? If you add like in RED, Your problem solvs

LOAD FIELD_A, FIELD_C  

Resident Table1;

FYI - https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/preceding-load...

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Contributor
Contributor

Re: Field not found error with load statement

ur preceding load throw error.. so ...insted of using preceding load 3 time you can write this way..

Table1:

SQL SELECT

          FIELD_A,   

          FIELD_B,

          FIELD_C

FROM .. ;

Table2:

LOAD FIELD_A,

Subfield(FIELD_C, '-', -1) as temp1,

SubField(FIELD_C, '-', -2) as temp2,

Subfield(FIELD_C, '-', 1) as temp3;

LOAD FIELD_A, FIELD_C   

Resident Table1;