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: 
Not applicable

How do I limit the load of data in one file based on the content of another table?

I have a file that contains all clients and am loading a tabe that contains all trades and I only want to load the clients if they have traded with us. The client ID appears in both the client file and the trade file.

How do I do this?

11 Replies
Not applicable
Author

Hi,

Try using the exists() function in the where clause and pass in the ClientID field.

Thanks

Nick

Not applicable
Author

Hi
Not applicable
Author

Hi,

Thanks for this, but you are talking to a non-IT person. What does this look like in code?

Cheers,

Kate

Not applicable
Author

Lets say your clientID in your client table is "ClientID" and your clientID in your Trade table is "Client_ID". When you load your Trade table you specify Load .... from Trade where exists ("ClientID", "Client_ID");

Edit: it is the other way around (I now read your post thoroughly): In your client table you specify Load .... from Client where exists ("Client_ID", "ClientID");

gauravkhare
Creator II
Creator II

Hi KateBain,

One more easy approach for this is that you can take a list box and in that you can define 2 attributes one will be those clients who have traded with your company and the other will will contain a field containing those records who have not traded. now when you load this fields in your listbox and click on any one them, it will show yp only those records corresponding to the above criteria. kindly try out this simple aproach and please let me know if you require something else or something more.

Not applicable
Author

Hi,

Thanks for this. It is getting close but my client id fields have identical names in both tables because they are the linking fields between the tables. I'm going to training in two days so I will resolve this in person then.

Regards, Kate

Not applicable
Author

Hello - I have the exact same question - did you get an answer by any chance?

pover
Luminary Alumni
Luminary Alumni

Check out Miguel's post in this discussion:

http://community.qlik.com/message/174147#174147

Not applicable
Author

Hi Karl - thanks for the response I'll try the match but I'm trying to do this on two tables being loaded via an ODBC connnection to Oracle. Do I need to tweak since the load is on millions of records?