Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there qlikview community,
I am new to Qlikview and i am trynig to join to tables. So there it is
NV200_Boundaries:
LOAD Validator,
Sensor,
High,
Low;
SQL SELECT *
FROM `list_a`.`initlimits`;
NV200_Data:
LOAD TestID,
TestDate,
SensorName,
SensorParam,
SensorValue;
SQL SELECT
SensorStats.TestID,
SensorStats.TestDate,
SensorValues.SensorName,
SensorValues.SensorParam,
SensorValues.SensorValue
FROM `office_a_log`.`nv200_init_sensor_header` AS SensorStats
JOIN `office_a_log`.`nv200_init_sensor_log` AS SensorValues
ON SensorStats.TestID = SensorValues.TestID;
I would like to join the tables nv200_boundaries and nv200_data in the key Sensor of the first table which is the same as Sensor name on the second table. Any help appreciated.
If you want to join (not associate) then you can write this LOAD statement :
INNER JOIN (NV200_Boundaries)
LOAD
TestID,
TestDate,
SensorName AS Sensor,
SensorParam,
SensorValue
RESIDENT NV200_Data;
OR
Modfiy the second load statement as follows :
INNER JOIN (NV200_Boundaries)
LOAD TestID,
TestDate,
SensorName AS Sensor,
SensorParam,
SensorValue;
SQL SELECT
SensorStats.TestID,
SensorStats.TestDate,
SensorValues.SensorName,
SensorValues.SensorParam,
SensorValues.SensorValue
FROM `office_a_log`.`nv200_init_sensor_header` AS SensorStats
JOIN `office_a_log`.`nv200_init_sensor_log` AS SensorValues
ON SensorStats.TestID = SensorValues.TestID;
I hope this helps!
MultiView
Rename Sensor to SensorName so qlikview can associate the two tables on that field:
NV200_Boundaries:
LOAD Validator,
Sensor as SensorName,
High,
Low;
SQL SELECT *
FROM `list_a`.`initlimits`;
Thanks for the answer for first. The problem is that i dont want only to associate them i want to create a new table that cosist the join of these two tables.
If you want to join (not associate) then you can write this LOAD statement :
INNER JOIN (NV200_Boundaries)
LOAD
TestID,
TestDate,
SensorName AS Sensor,
SensorParam,
SensorValue
RESIDENT NV200_Data;
OR
Modfiy the second load statement as follows :
INNER JOIN (NV200_Boundaries)
LOAD TestID,
TestDate,
SensorName AS Sensor,
SensorParam,
SensorValue;
SQL SELECT
SensorStats.TestID,
SensorStats.TestDate,
SensorValues.SensorName,
SensorValues.SensorParam,
SensorValues.SensorValue
FROM `office_a_log`.`nv200_init_sensor_header` AS SensorStats
JOIN `office_a_log`.`nv200_init_sensor_log` AS SensorValues
ON SensorStats.TestID = SensorValues.TestID;
I hope this helps!
MultiView