4 Replies Latest reply: Sep 24, 2012 6:33 AM by whiteline _ RSS

    Join on specific columns



      I wonder if anyone could shed some light on this for me please.


      I have many tables that contain a huge amount of information, however I want to evaluate the software so I've created a specific example that makes use of three seperate tables that all contain information about customers.  I want to link these tables together so that I can display any combination of data from the three data sources at a later point in time.  I understand that I can join tables together, however QlikView appears to be automatically determining which field to join on and it's getting this wrong (each table has a seperate auto-increment column called id, which is independant of the other tables but appears first in the field list).


      Is it possible for me to force a join on a specific column?


      Any pointers would be much appreciated!




        • Re: Join on specific columns
          whiteline _

            QlikView appears to be automatically determining which field to join


          You can use 'as' statement to rename fields in script. QV 'joins' them by field names.

          I think you'd better read the basic tutorual or even reference manual...

          • Re: Join on specific columns
            jagan mohan rao appala




            Qlikview by default joins tables based on the column names, so you should rename the other column names to avoid join based on other columns.  You can rename the column names by using "AS" keyword.  This way you can join the tables based on the specified condition.




            • Re: Join on specific columns

              Thanks for the help. 


              I had read the documentation, my problem is that after I've finished my example case I need build a live system.  Our system contains a lot of data across multiple databases and hundreds of tables and I'm concious that specifically defining each column (so that I can create aliases) will be very time consuming.  If I could just SELECT * on these tables and then manually add the joins it wouldn't have been as bad, hence my question.


              I'll see if I can automate the creation of the script though.


              Thanks again