Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
flygstolen_fred
Creator
Creator

Table field relation in load statement

Hi,

I'm trying to use a related field in the where clause of my load statement, but if fails.

LOAD

    Booking AS BookingId,

    Destination AS BookingDestination;

LOAD

    IATA as BookingDestination,

    ContinentCode as BookingContinentCode;

The following WHERE clause later in the load statement fails becuase "BookingContinentCode"  is unkown:

WHERE BookingId = 2134 AND BookingContinentCode = 'EU';

Any help are appreciated!

13 Replies
Anonymous
Not applicable

With regard to :

     WHERE MarkupContinent LIKE '*' & BookingDestinationContinentName & '*');


I cannot see a field called BookingDestinationContinentName being added into the TMPINVOICE table that you resident load from with this WHERE


Personally I have never used LIKE in Qlik, I would use Match() or WildMatch() instead, or maybe Exists() depending on your precise needs.

flygstolen_fred
Creator
Creator
Author

Thanks for trying to help.

Is it necessary to add that to TMPINVOICE?

Actually, I have missed one thing in the Markup table:

Markup:

LOAD

    description AS MarkupDesc,

    price AS MarkupPrice,

    continent as MarkupContinent,

    iata as MarkupIata;

And when I do this it works:

Concatenate (Product)

LOAD

    InvoiceId,

    MarkupDesc AS ProductDescription,

    0 AS ProductPrice,

RESIDENT TMPINVOICE WHERE MarkupIata LIKE '*' & BookingDestination & '*');

But when I try to compare with BookingDestinationContinentName instead, it fails.

Anonymous
Not applicable

I suspect a Where Exists() is what you need.

Here is a Blog Post about it Qlik Tips: Does it exist?

And here is the Help section which has some examples

https://help.qlik.com/en-US/sense/3.2/Subsystems/Hub/Content/Scripting/InterRecordFunctions/Exists.h...

flygstolen_fred
Creator
Creator
Author

I missed inner joining BookingDestinationGEO table in TMPINVOICE setup.

Thanks for helping out.