<?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 Re: Complex SQL Query turned into QVD Query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551366#M205933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel Angel for your quick answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point is that in my original SQL Query there are a lot of complex stuff like where field1 in (select distinct field1 from table2), and things like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why I'm not loading my Table directly from the SQL query? Because the query is too heavy and I cannot do it right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I decided first of all download all the related tables in qvds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The perfect way would be a syntax as similar as possible as the SQL Query, but I think maybe this is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not possible, I'll try by your way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jul 2013 16:29:01 GMT</pubDate>
    <dc:creator>marcel_olmo</dc:creator>
    <dc:date>2013-07-08T16:29:01Z</dc:date>
    <item>
      <title>Complex SQL Query turned into QVD Query</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551364#M205931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, I have a query like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE1.FIELD1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE2.FIELD2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE3.FIELD3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLE1.FIELD1 = TABLE2.FIELD1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND TABLE1.FIELD1 = TABLE3.FIELD1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a very complex query which makes the computer memory go upper their limit. So it collapses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to avoid this, I decided to create different qvds from the different tables I want to relate to. Once I have the QVD tables, I'd can replicate the same query as the SQL query showed before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are my QVD tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table1.qvd, Table2.qvd, Table3.qvd, etc.....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a lot of tables and a lot of fields to join. My point is --&amp;gt; How to avoid loading first the qvd tables in memory to make the joins after?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to replicate the same syntax as SQL with the QVD way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 14:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551364#M205931</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2013-07-08T14:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Complex SQL Query turned into QVD Query</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551365#M205932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What about loading each field beforehand then use the EXISTS() clause?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1373300563948808" jivemacro_uid="_1373300563948808"&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD Field1&lt;/P&gt;&lt;P&gt;FROM Table1.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;LOAD Field2&lt;/P&gt;&lt;P&gt;FROM Table2.qvd (qvd);&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table3:&lt;/P&gt;&lt;P&gt;LOAD Field3&lt;/P&gt;&lt;P&gt;FROM Table3.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableFull:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM *.qvd (qvd)&lt;/P&gt;&lt;P&gt;WHERE Exists(Field1, Field2) AND Exists(Field2, Field3);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 16:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551365#M205932</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2013-07-08T16:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Complex SQL Query turned into QVD Query</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551366#M205933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel Angel for your quick answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point is that in my original SQL Query there are a lot of complex stuff like where field1 in (select distinct field1 from table2), and things like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why I'm not loading my Table directly from the SQL query? Because the query is too heavy and I cannot do it right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I decided first of all download all the related tables in qvds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The perfect way would be a syntax as similar as possible as the SQL Query, but I think maybe this is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not possible, I'll try by your way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 16:29:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551366#M205933</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2013-07-08T16:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Complex SQL Query turned into QVD Query</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551367#M205934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to reset your mind to code similar things in QlikView script. You cannot use SQL-like code if you want to make it with low memory footprint AND high performance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, there is always a way doing it right even if the SQL is complex. Btw. I guess it's not complex with only three tables..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 16:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-SQL-Query-turned-into-QVD-Query/m-p/551367#M205934</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-07-08T16:59:04Z</dc:date>
    </item>
  </channel>
</rss>

