Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Simon4
Creator
Creator

Connecting two tables

Hi Qlik community,

I am fairly new to Qlik and I need some help.

I need to connect these two tables, the tables are fetched from a database so the tables itself cannot be changed. The numbers match up, but one table has an 'I-'before every number. Because of this Qlik does not understand the connection. 

Is there a way to fix this?

Kind regards,

Simon

 

 Combining two tables.PNG

Labels (2)
1 Solution

Accepted Solutions
Simon4
Creator
Creator
Author

Hi Mark,

 

Thankyou for the respons. I took a good look at the query (which is not fully writen by me). And if found out the problem was comming from elsewere. 

It looked like this:

tblGoodsreceiptdetails:
LOAD
'I-' & "PK_R_GOODSRECEIPTDETAILITEM" AS Receiptdetailid,
"FK_GOODSRECEIPT" AS Goodsreceiptid,
'I-' & "FK_PURCHASEORDERDETAILITEM" AS POdetailid,
'I-' & "FK_ITEM" AS Itemid,
NETPURCHASEPRICE AS Netpurchaseprice;

 

I changed it to 

tblGoodsreceiptdetails:
LOAD
"PK_R_GOODSRECEIPTDETAILITEM" AS Receiptdetailid,
"FK_GOODSRECEIPT" AS Goodsreceiptid,
"FK_PURCHASEORDERDETAILITEM" AS POdetailid,
"FK_ITEM" AS Itemid,
NETPURCHASEPRICE AS Netpurchaseprice;

 

And now the tables match up.

 

Why did the original writer of the query put the 'I-' &   before every load?

 

Thanks again for answering and sorry for using up your valuable time. 

 

Kind regards,

 

Simon

View solution in original post

2 Replies
Mark_Little
Luminary
Luminary

HI @Simon4 

You will need to look at this in the script editor. 

Would need a functions 

Right(Field,LEN(Field-2)) AS Field

Simon4
Creator
Creator
Author

Hi Mark,

 

Thankyou for the respons. I took a good look at the query (which is not fully writen by me). And if found out the problem was comming from elsewere. 

It looked like this:

tblGoodsreceiptdetails:
LOAD
'I-' & "PK_R_GOODSRECEIPTDETAILITEM" AS Receiptdetailid,
"FK_GOODSRECEIPT" AS Goodsreceiptid,
'I-' & "FK_PURCHASEORDERDETAILITEM" AS POdetailid,
'I-' & "FK_ITEM" AS Itemid,
NETPURCHASEPRICE AS Netpurchaseprice;

 

I changed it to 

tblGoodsreceiptdetails:
LOAD
"PK_R_GOODSRECEIPTDETAILITEM" AS Receiptdetailid,
"FK_GOODSRECEIPT" AS Goodsreceiptid,
"FK_PURCHASEORDERDETAILITEM" AS POdetailid,
"FK_ITEM" AS Itemid,
NETPURCHASEPRICE AS Netpurchaseprice;

 

And now the tables match up.

 

Why did the original writer of the query put the 'I-' &   before every load?

 

Thanks again for answering and sorry for using up your valuable time. 

 

Kind regards,

 

Simon