2 Replies Latest reply: Dec 1, 2011 4:25 AM by rohit gupta RSS

    Differenc b/w keep & join?

    Shubham Kumar

      What is the main difference b/w keep & join?

        • Differenc b/w keep & join?
          Jagan Nalla

          For this topice you can through the reference manual..

           

          Join vs Keep:

           

          It will give the combination of two tables data(i.e single table) where as keep makes the link between two tables. But, the result will be same when you use join or keep. By using keep qlikview providing little bit future i.e it saves the memory. If you join the two tables it takes more memory.

          • Re: Differenc b/w keep & join?
            rohit gupta

            hi

            Left

            The join and keep prefixes can be preceded by the prefix left.

            If used before join it specifies that a left join should be used. The resulting table will only contain combinations of field values from the raw data tables with a full set of data from the first table.

            If used before keep, it specifies that the second raw data table should be reduced to its common intersection with the first table, before being stored in QlikView.

            left ( join | keep) [ (tablename ) ](loadstatement |selectstatement )

            Examples:

            Table1

            A

            B

            1

            aa

            2

            cc

            3

            ee

             

            Table2

            A

            C

            1

            xx

            4

            yy

             

            QVTable:

            select * from table1;

            left join select * from table2;

            QVTable

            A

            B

            C

            1

            aa

            xx

            2

            cc

            3

            ee

             

            QVTab1:

            select * from Table1;

            QVTab2:

            left keep select * from Table2;

            QVTab1

            A

            B

            1

            aa

            2

            cc

            3

            ee

             

            QVTab2

            A

            C

            1

            xx

            The two tables in the keep example are, of course, associated via A.

             

            tab1:

            Load * from file1.csv;

            tab2:

            load * from file2.csv;

            .. .. ..

            left keep (tab1) load * from file3.csv;

              thanks &regards

            rohit