<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304116#M1200680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you mean, but you don't need to use any inner joins in your case. The code I wrote above should not be generating any errors, assuming you field names are correct. Please post a reduced version of your document and I'll take a look at the load script.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Feb 2011 16:04:25 GMT</pubDate>
    <dc:creator>vgutkovsky</dc:creator>
    <dc:date>2011-02-07T16:04:25Z</dc:date>
    <item>
      <title>How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304113#M1200677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey all,&lt;/P&gt;&lt;P&gt;I am working on 3 different tables to form a temporary table and to load different fields to the table. When i am using the load statement with group by clause, it asks for aggregate function. i tried with aggregate functions of different fields and the error says invalid expression and the table is not loaded.&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tmptable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL select table1.id,table1.name,table2.tyid,table2.age,table3.location from table 1&lt;/P&gt;&lt;P&gt;inner join table 2 on table1.id = table2.id&lt;/P&gt;&lt;P&gt;inner join table3 on table2.tyid = table3.tyid&lt;/P&gt;&lt;P&gt;where table1.name is not null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load id as id&lt;/P&gt;&lt;P&gt;count(typid) as numoftypeid¨&lt;/P&gt;&lt;P&gt;age as age&lt;/P&gt;&lt;P&gt;if(name ='abc',location) as currlocation&lt;/P&gt;&lt;P&gt;resident tmptable&lt;/P&gt;&lt;P&gt;group by id;&lt;/P&gt;&lt;P&gt;drop tmptable;&lt;/P&gt;&lt;P&gt;My problem is which field i should use the aggregate function . Because my data in the table comes with repetation of id with different field data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to combine all the fields in one row with the same id.&lt;/P&gt;&lt;P&gt;can anyone help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;jai.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 15:26:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304113#M1200677</guid>
      <dc:creator />
      <dc:date>2011-02-04T15:26:56Z</dc:date>
    </item>
    <item>
      <title>How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304114#M1200678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jai,&lt;/P&gt;&lt;P&gt;A QV group by requires that all fields (except the ones you're grouping by of course) be aggregated. That's why you're getting the error you mentioned. Try this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;final_data:&lt;BR /&gt;LOAD&lt;BR /&gt; id,&lt;BR /&gt; age,&lt;BR /&gt; if(name ='abc',location) as currlocation&lt;BR /&gt;resident tmptable;&lt;BR /&gt;LEFT JOIN LOAD&lt;BR /&gt; id,&lt;BR /&gt; count(typid) as numoftypeid&lt;BR /&gt;resident tmptable&lt;BR /&gt;group by id;&lt;BR /&gt;drop tmptable;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 18:20:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304114#M1200678</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-02-04T18:20:54Z</dc:date>
    </item>
    <item>
      <title>How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304115#M1200679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey Vlad,&lt;/P&gt;&lt;P&gt;Thanks for your reply. I implemented the way you suggested me.&lt;/P&gt;&lt;P&gt;But i am getting invalid expression or if i do aggregation with the different table field,i am getting the same data duplicated.&lt;/P&gt;&lt;P&gt;can you explain me in detail about the process of loading the data with inner join of 3 or more tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 15:54:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304115#M1200679</guid>
      <dc:creator />
      <dc:date>2011-02-07T15:54:53Z</dc:date>
    </item>
    <item>
      <title>How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304116#M1200680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you mean, but you don't need to use any inner joins in your case. The code I wrote above should not be generating any errors, assuming you field names are correct. Please post a reduced version of your document and I'll take a look at the load script.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 16:04:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304116#M1200680</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-02-07T16:04:25Z</dc:date>
    </item>
    <item>
      <title>How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304117#M1200681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey Vlad,&lt;/P&gt;&lt;P&gt;Thanks once again for your help. i am posting the reduced version of the document.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tmpinfo:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT Objekt.ObjektId,Objekt.size,Objekt.noofroom,Roll.checkRoll,&lt;/P&gt;&lt;P&gt;substring(Person.firstname,1,15)+' '+substring(Person.surname,1,15) as PersonName&lt;/P&gt;&lt;P&gt;FROM Objekt&lt;/P&gt;&lt;P&gt;INNER JOIN ObjektIntressent&lt;/P&gt;&lt;P&gt;ON Objekt.ObjektId = ObjektIntressent.ObjektId&lt;/P&gt;&lt;P&gt;INNER JOIN Roll&lt;/P&gt;&lt;P&gt;ON ObjektIntressent.ObjektId = Roll.ObjektId&lt;/P&gt;&lt;P&gt;INNER JOIN Person&lt;/P&gt;&lt;P&gt;ON ObjektIntressent.PersonId = Person.PersonId&lt;/P&gt;&lt;P&gt;WHERE (Roll.checkRoll = '1' or Roll.checkRoll = '2' or Roll.checkRoll = '6');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ObjektId,&lt;/P&gt;&lt;P&gt;Size,&lt;/P&gt;&lt;P&gt;Noofroom,&lt;/P&gt;&lt;P&gt;if (checkRoll = '1',PersonName,'') as Seller,&lt;/P&gt;&lt;P&gt;if (checkRoll = '2',PersonName,'') as Shopper,&lt;/P&gt;&lt;P&gt;if (checkRoll = '6',PersonName,'') as Mediator&lt;/P&gt;&lt;P&gt;Resident tmpinfo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE tmpinfo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i load the table, i am getting the values like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ObjektId Size Noofroom Seller Shopper Mediator&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1 10 2 adc&lt;/P&gt;&lt;P&gt;1 10 2 rew&lt;/P&gt;&lt;P&gt;1 10 2 wer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is written in 3 different rows. I tried left join with aggregation different data exccept the group by field. But getting invalid Expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need some more data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jai.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 13:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304117#M1200681</guid>
      <dc:creator />
      <dc:date>2011-02-08T13:48:26Z</dc:date>
    </item>
    <item>
      <title>How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304118#M1200682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jai,&lt;/P&gt;&lt;P&gt;This is not a reduced version of the document...I meant a QVW. Very hard to tell anything from this...&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 16:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304118#M1200682</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-02-08T16:34:00Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304119#M1200683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Perhaps what you need is a MaxString like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Load&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;ObjektId,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Size,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Noofroom,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;MaxString(if (checkRoll = '1',PersonName,'')) as Seller,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;MaxString(if (checkRoll = '2',PersonName,'')) as Shopper,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;MaxString(if (checkRoll = '6',PersonName,'')) as Mediator&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Resident tmpinfo&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Group by ObjektId,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;Size,&lt;/CODE&gt;&lt;/P&gt;&lt;CODE&gt;Noofroom;&lt;BR /&gt;&lt;/CODE&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;You will obtain only 1 row :&lt;/P&gt;&lt;P&gt;1;10;2;adc;rew;wer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 18:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304119#M1200683</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2011-02-08T18:18:37Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304120#M1200684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Vincent,&lt;/P&gt;&lt;P&gt;It works... :).. Thanks for your help.&lt;/P&gt;&lt;P&gt;jai&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 11:24:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304120#M1200684</guid>
      <dc:creator />
      <dc:date>2011-02-09T11:24:20Z</dc:date>
    </item>
    <item>
      <title>How to use group by clause in Load statement if Select statement has Inner join of different tables(more than 2)?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304121#M1200685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Vlad,&lt;/P&gt;&lt;P&gt;Since i am new to this qlikview, it is very hard with the qlikview terms.So i sent my query to get resolved. Now learning quite well i believe. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;jai.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 11:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-group-by-clause-in-Load-statement-if-Select-statement/m-p/304121#M1200685</guid>
      <dc:creator />
      <dc:date>2011-02-09T11:27:42Z</dc:date>
    </item>
  </channel>
</rss>

