Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
JACKNIEKERK
Creator
Creator

Reading 2 tabels with different keylen

having 1 tabel with keylen 16 charters long  , right ajusted like  '          123456'  named eg.  Productienummer;

then other tabel with keylen 8   righ ajusted like '  123456'   named eg.  AflbonNumber,

Loading goes like

load
TracingKode as Productienummer;
SQL select * from TRACCODE;


load
AflbonNumber;
SQL select * from SalesTabel;

In a graph object i need to show all records from tabel SalesTabel  using  the key Productienummer  from tabel TRACCODE

 

 

 

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Try this:

TFilt:
LOAD Trim(TracingKode) as Productienummer;

SQL select TracingKode from TRACCODE;

Sales:
LOAD *
Where Exists(Productienummer, Trim(AflbonNumber);
SQL select * from SalesTabel;

DROP Table  TFilt;

If the data set is large, you may want to perform a join in SQL to limit the date being transferred to Qlik.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
Taoufiq_Zarra

why not use the trim() function

Example Result

Trim( ' abc' )Returns 'abc'
Trim( 'abc ' )Returns 'abc'
Trim( ' abc ' )Returns 'abc'

 

so the script becomes

 

load
RowNo() as IDTACCODE,
trim(TracingKode) as Productienummer;
SQL select * from TRACCODE;


load
RowNo() as IDSalesTabel,
trim(AflbonNumber) as Productienummer;
SQL select * from SalesTabel;

 

 

rowno() to differentiate those from the first table from those from the second if necessary

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
jonathandienst
Partner - Champion III
Partner - Champion III

Try this:

TFilt:
LOAD Trim(TracingKode) as Productienummer;

SQL select TracingKode from TRACCODE;

Sales:
LOAD *
Where Exists(Productienummer, Trim(AflbonNumber);
SQL select * from SalesTabel;

DROP Table  TFilt;

If the data set is large, you may want to perform a join in SQL to limit the date being transferred to Qlik.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
JACKNIEKERK
Creator
Creator
Author

that works

thank you