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: 
1adam_haj
Contributor III
Contributor III

Load if match value from table

Hello, I have two tables:

1) Document table

DocumentValueVersion
20Z00151
20Z00172

 

2) Last Version of document

DocumentLast_version
20Z0012

 

And I want load data only from the last version of the document. Can I make some exeptional LOAD where i could load only rows where Version matches Last version from another table ? 

Labels (3)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

yes you can 
something like this will work 

latestversions:
Load Document,
     Last_version,
     Document & '_' & Last_version as docKey
from XXX;

Data:
Load * 
From YYY
where exists(docKey,Documnet & '_' & Version);

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

yes you can 
something like this will work 

latestversions:
Load Document,
     Last_version,
     Document & '_' & Last_version as docKey
from XXX;

Data:
Load * 
From YYY
where exists(docKey,Documnet & '_' & Version);
Vegar
MVP
MVP

This would solve your issue.

[Final table]:
Load 
   Document,
   Last_version as Version
From LastVersion_Soure
;

Left join ([Final table])
Load *
From  DocumentTable_Source
;