<?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 Select in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617858#M4340</link>
    <description>&lt;P&gt;I need to run this sql code, an save the result in a qvd file.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2019 18:46:14 GMT</pubDate>
    <dc:creator>mfcelleri</dc:creator>
    <dc:date>2019-08-28T18:46:14Z</dc:date>
    <item>
      <title>Complex SQL Select</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617300#M4334</link>
      <description>&lt;P&gt;Hi guys;&lt;/P&gt;&lt;P&gt;Is there any way to store in a qvd file; a complex SQL Statement like this? How can I do?&lt;/P&gt;&lt;P&gt;SQL SELECT saeprbo.prbo_cod_prod,&lt;BR /&gt;saeprbo.prbo_cod_bode,&lt;BR /&gt;saeprbo.prbo_cod_unid,&lt;BR /&gt;saeprbo.prbo_cod_empr,&lt;BR /&gt;saeprbo.prbo_cod_sucu,&lt;BR /&gt;(select sum(case d.defi_tip_defi when '5' then c.dmov_can_dmov when '0' then c.dmov_can_dmov when '1' then - c.dmov_can_dmov when '6' then -c.dmov_can_dmov end)&lt;BR /&gt;from saedmov c,saeminv b,saedefi d&lt;BR /&gt;where b.minv_cod_empr= c.dmov_cod_empr and&lt;BR /&gt;b.minv_cod_sucu= c.dmov_cod_sucu and&lt;BR /&gt;b.minv_num_comp= c.dmov_num_comp and&lt;BR /&gt;c.dmov_cod_prod= saeprbo.prbo_cod_prod and&lt;BR /&gt;d.defi_cod_empr = b.minv_cod_empr and&lt;BR /&gt;d.defi_cod_tran = b.minv_cod_tran and&lt;BR /&gt;b.minv_fmov &amp;lt;= today ) ingresos,&lt;BR /&gt;(select sum(case d.defi_tip_defi when '5' then c.dmov_can_dmov when '0' then c.dmov_can_dmov when '1' then - c.dmov_can_dmov when '6' then c.dmov_can_dmov end)&lt;BR /&gt;from saedmov c,saeminv b,saedefi d&lt;BR /&gt;where b.minv_cod_empr= c.dmov_cod_empr and&lt;BR /&gt;b.minv_cod_sucu= c.dmov_cod_sucu and&lt;BR /&gt;b.minv_num_comp= c.dmov_num_comp and&lt;BR /&gt;c.dmov_cod_prod= saeprbo.prbo_cod_prod and&lt;BR /&gt;d.defi_cod_empr = b.minv_cod_empr and&lt;BR /&gt;d.defi_cod_tran = b.minv_cod_tran and&lt;BR /&gt;b.minv_cod_empr = saeprbo.prbo_cod_empr and&lt;BR /&gt;(c.dmov_bod_envi = saeprbo.prbo_cod_bode) and&lt;BR /&gt;b.minv_fmov &amp;lt;= today ) egresos&lt;BR /&gt;FROM saeprbo,&lt;BR /&gt;saeprod a&lt;BR /&gt;WHERE ( a.prod_cod_prod = saeprbo.prbo_cod_prod ) and&lt;BR /&gt;( a.prod_cod_empr = saeprbo.prbo_cod_empr ) and&lt;BR /&gt;( a.prod_cod_sucu = saeprbo.prbo_cod_sucu );&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 21:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617300#M4334</guid>
      <dc:creator>mfcelleri</dc:creator>
      <dc:date>2021-12-13T21:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Complex SQL Select</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617839#M4339</link>
      <description>Not clear what your need is. You want to save the sql (text) into a qvd? Or the output into a qvd?&lt;BR /&gt;Please elaborate your use case, why etc.</description>
      <pubDate>Wed, 28 Aug 2019 18:25:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617839#M4339</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-08-28T18:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Complex SQL Select</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617858#M4340</link>
      <description>&lt;P&gt;I need to run this sql code, an save the result in a qvd file.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 18:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617858#M4340</guid>
      <dc:creator>mfcelleri</dc:creator>
      <dc:date>2019-08-28T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Complex SQL Select</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617873#M4341</link>
      <description>&lt;P&gt;OK.&lt;/P&gt;&lt;P&gt;in your load script do below&lt;/P&gt;&lt;P&gt;. replace your-sql with the actual one&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mytable:
load *
;
sql
your-sql
;

Store mytable into 'lib://FolderConnection/mytable.qvd';
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;refer&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/June2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Store.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/June2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Store.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 19:04:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Complex-SQL-Select/m-p/1617873#M4341</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-08-28T19:04:53Z</dc:date>
    </item>
  </channel>
</rss>

