Reputation: 27
can you tell me how to do inner join from db connected using odbc. I tried this query but got an error.
inner join(power_target)
LOAD sku from power_measured;
The error I'm getting
File not found error
Cannot open file: 'C:\Users\hardipix\Downloads\pro\power_measured' System error: Filesystem::FindImpl FindFirst call: Incorrect function: "C:\Users\hardipix\Downloads\pro"
inner join(power_target) LOAD sku from power_measured
power target is a target table or the left table with which I want to perform a join power measured is the other table sku is the common field. Actually there are two more fields that are common. How should I proceed please help out.
My main motive is to show comparison columns from the table with the columns project power target, project power measured, preview power target and preview power measured.
Upvotes: 0
Views: 923
Reputation: 1633
Qlik scripting syntax requires that the table to be joined to is already loaded before the join action. Unlike SQL that assumes it needs to load all referenced tables.
At the most basic level to load from an SQL result set you need to do this:
sql select * from power_target;
inner join sql select * from power_measured;
Also worth noting is that in Qlik you don't reference the join fields directly but rather Qlik assumes it needs to join on all fields that are named exactly the same. So you might need to do something like this (obviously your field names will vary from the ones I made up);
sql select Target,
Product_number as sku
from power_target;
inner join
sql select Measure,
sku from power_measured;
This would result in a new table with 3 columns sku, Target and Measure
Upvotes: 1