Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Load: Compare with other resident table field

How can I load a resident table comparing(where ) a field with other resident table field.

Resident1:

LOAD

ID,

PR_NUM,

PO_NUM,

REQUESTOR

PR_Amount;

RESIDENT PR_XYZ;

Now I am loading whole records in to PO_OPEX table.

PO_OPEX:

LOAD

ID,

PO_NUM,

REQUESTOR

PR_Amount;

SQL Select * from PO_OPEX;

I want to create a resident table as a subset of PO_OPEX which matches with a field in Resident1

Resident2:

LOAD

LOAD

ID,

PO_NUM,

REQUESTOR

PR_Amount;

RESIDENT PO_OPEX WHERE Resident1.REQUESTOR Match('abc','xy'):


Here is the problem Loading Resident2 by checking with Resident1.REQUESTOR.
How to achieve this.

Concatenate  or Join. pls provide sample syntax.

5 Replies

Re: Load: Compare with other resident table field

I don't understand your question at all. Why should REQUESTOR in table Resident1 match abc or xy? You've already loaded Resident1.


talk is cheap, supply exceeds demand
Not applicable

Re: Load: Compare with other resident table field

Hi

Yes I loaded REQUESTOR in Resident1.

Now I want to load another table with Requestor Column, which match with Resident1 Requestor specificvalues.

Re: Load: Compare with other resident table field

If you know the specific values then you can match with those specific values:

Resident2:

LOAD

LOAD

ID,

PO_NUM,

REQUESTOR

PR_Amount;

RESIDENT PO_OPEX WHERE Match(REQUESTOR ,'abc','xy'):


If you want to load all the records that have any matching REQUESTOR  value in Resident1 the use the Exists function:


Resident2:

LOAD

LOAD

ID,

PO_NUM,

REQUESTOR

PR_Amount;

RESIDENT PO_OPEX WHERE Exists(REQUESTOR):



talk is cheap, supply exceeds demand
Not applicable

Re: Load: Compare with other resident table field

But I want to match with Resident1 REQUESTOR while loading

Re: Load: Compare with other resident table field

I've give you two options to match with the values of REQUESTOR from Resident1.

Case 1: You know already which specific values you want to match: 'abc' and 'xy'. In that case use my first example.

Case 2: You want to match with any REQUESTOR value that exists in table Resident1. In that case use my second example.

If you want to do something that is not case 1 or case 2 then you'll have to explain in extreme detail, because I cannot imagine what that situation would be.


talk is cheap, supply exceeds demand
Community Browser