Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have following tables:
USER
Comments Posted in 4 WKS
Comments Posted in 26 WKS
Comments Posted in 52 WKS
AU_ID is the key
What would be the script to ensure that tables have inner join between them?
Thanks,
TA
Load your USER table (and name it typing USER: before LOAD statement).
Then before each next LOAD statement type: inner join(USER)
Hi Whiteline,
I have done this but it has created a problems
Filelds from the other tables are also included in the USER table now. Means - No separate tables for
Comments Posted in 4 WKS
Comments Posted in 26 WKS
Comments Posted in 52 WKS
exists any more.
Do you know why it not showing seprate tables any more?
Replace join with keep:
INNER KEEP (User) LOAD
' Join' will join the tables the way you see into one table. This is just like what you get with an sql query with joins: one tabular set of results.
But what are the problems with having the tables joined to one in Qlikview? Do you really need separate tables? If so can you explain why?
Gwassenaar,
Well, As long as I am getting the correct results I dont have any problem, But I was just curious why it is showing al lthe fields in one table. Thats it.
Doesn't QV automatically creates inner join based on the same fields names?
Thanks,
Michael,
What is the difference between Join and Keep?
Thanks,
It is what it says 🙂
JOIN joins the tables together
KEEP keeps them separate (still applying inner or left or right...)
Thats right, but when I want to inner join and keep them seperate then what should is write?
Does "Inner keep (USER)" means that it will create an innerjoin and keeps the tables seperate or
can join and keep can come together?
tahirghalib,
You are right it means the same but keeps the tables separate. I thought you wanted to join them completely 🙂 Use keep instead.
Look at help, the word 'inner', there are examples.
You can't - and don't need to - use both join and keep together. What you describe is done by keep (see help). Give it a try, and see the result.