Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I need help to join 2 tables
Table1:
Load
Vehicle
Date
Table2
Vehicle
Date
But the format in Table 1 is a Vehicle ID
and in Table 2 its Vehicle ID and OwnerID as Vehicle (done by Server Admin)
so data in Table 1 looks like this
1234 1/1/2015
and table 2 its
1_1234 1/1/2015
I want the end result to join these 2 tables and show as table 2 so all table 1 links on Vehicle but also shows OwnerID with Vehicle.
Both Tables have same Vehicle data.
Thanks
Vehicles:
LOAD
Vehicle AS Vehicle_ID,
Date AS VehicleDate
FROM
xxxxxx;
Owners:
LOAD
SubField( Vehicle , '_' , 2 ) AS Vehicle_ID,
SubField( Vehicle , '_' , 1 ) AS Owner,
Date AS OwnerDate
FROM
yyyyyy;
Will make a connection (key) between the two tables on the Vehicle_ID - effectively working as a join in the Associate Database of QlikView without joining...
Vehicles:
LOAD
Vehicle AS Vehicle_ID,
Date AS VehicleDate
FROM
xxxxxx;
Owners:
LOAD
SubField( Vehicle , '_' , 2 ) AS Vehicle_ID,
SubField( Vehicle , '_' , 1 ) AS Owner,
Date AS OwnerDate
FROM
yyyyyy;
Will make a connection (key) between the two tables on the Vehicle_ID - effectively working as a join in the Associate Database of QlikView without joining...
Does owner ID and vehicle are always linked to each other with a underscore between them?
Yes They are.
Than what Petter has provided should work for you well.
Hi Petter
Not sure, but can i get this
SubField( Vehicle , '_' , 1 ) AS Owner,
to then be added to table 1?
What i wanted was
Vehicles:
LOAD
Owner and Vehicle AS Vehicle_ID,
Date AS VehicleDate
FROM
xxxxxx;
Sorry, just tested this and all is working properly!!!
Thanks Petter