Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have following tables:
Users
PV_Last _Week
PV_Last _4_Weeks
HPW_Last_Week
HPW_Last_4_Weeks
UC_Last_Week
UC_Last_4_Weeks
With AU_ID key in all of the tables.
What will be the Load Statement for ensuring inner join between all of the tables?
Thanks,
TA
Hi
Assuming these are QVDs then the following:
LOAD * FROM USERS;
INNER JOIN LOAD * FROM PV_Last_Week;
INNER JOIN LOAD * FROM PV_Last_4_Weeks;
etc
If the tables are in a database then the load statement is slightly different, but only in that you'd need to source the data from your database, I'm not going to guess on that because each one is different. The above should give you a clue as to where to go with it though.
Hi,
I attached a sample to using inner join in multiple table with single id.
Hope its helpful for u.
Regards,
Iyyappan
Hi Ncwest and Layyappan,
Thanks for your reply.
Layyappan,
Right now I am working on my laptop which has only personal edition installed and I cant open your example.
If you could describe (source/names of the tables/ids and load statement) that would be awesome and could save my day 🙂
Thanks,
TA
Hi,
In Script load the User table:
Users:
Load *
from
User;
Inner Join(Users)
Load
*
from
PV_Last _Week;
Inner Join(Users)
Load
*
from
PV_Last _4_Weeks;
.
.
.
.
Inner Join(Users)
Load
*
from
UC_Last_4_Weeks;
Note : AU_ID is same in all table . finally u wil get the all filelds in Users table.
Iyyappan
Layyappan,
Thanks for your update once again. Unfortunatly it is not not giving me the correct result.
What is the difference between Inner Join/Keep (Users) and only "Inner Join/Keep"
I mean what is difference between if we write the table name at the end and if we dont?
Thanks,
TA
Hi Iyyappan,
Now I can see your test qvw and Inner Join. Thanks for that.
Why you used "Inline"? What is that?
Hi,
Inner Join(users) just u identify the which table inner join the data that why we mentioned.
Instead of Inline u can use ur table. i am just give sample data for u.
Inline means we can upload the sample data or user can give the data manually using the Inline function.
Iyyappan.
Hi All
I have a similar case in one of my report in QV.
I'm joining 5 QVDs each having more than 13 million entries.
The cust_id is common among all the QVDs. when i wrote something as below,
Cust:
load * from Cust.QVD(QVD);
inner join(Cust)
load * from Address.QVD(QVD);
inner join(Cust)
load * from Email.QVD(QVD);
inner join(Cust)
load * from Contact.QVD(QVD);
inner join(Cust)
load * from Accounts.QVD(QVD);
It stops in the second load itself throwing out ofvirtual memory error. Can anyone pls help how to solve the above.