<?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 Store tables into one QVD in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2517690#M105960</link>
    <description>&lt;P&gt;I have several tables in my Qlik today.&lt;BR /&gt;It contains data from article register, forecast, stock etc.&lt;/P&gt;&lt;P&gt;When I run my qvw i have today it shows todays information.&lt;/P&gt;&lt;P&gt;I want to load all data from all tables, store them all in one QVD file, save as for example 2025-05-13-20:00 and drop all tables.&lt;/P&gt;&lt;P&gt;Afterwards I would like to select from all stored QVDs in my qvw to look at the values ​​that were according to the saved QVD files date/time, this to compare values from each day.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is this possible?&lt;/P&gt;&lt;P&gt;I've tried below but haven't quite managed to achieve what I'm looking for.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are there other simpler scripts that solve this, other than the one I've already tried below?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//LOAD ITEM&lt;BR /&gt;Item:&lt;BR /&gt;load&lt;BR /&gt;ITNO as %ArtNr,&lt;BR /&gt;ITDS as Itemdisc&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt;ITNO, ITDS&lt;BR /&gt;FROM "PRD".dbo.Items&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//LOAD STOCK&lt;BR /&gt;left Join (Item)&lt;BR /&gt;load&lt;BR /&gt;2ITNO as %ArtNr,&lt;BR /&gt;2STQT as Stock&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt;2ITNO, 2STQT&lt;BR /&gt;FROM "PRD".dbo.Stocks&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//LOAD FORECAST&lt;BR /&gt;Forecast:&lt;BR /&gt;load *&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Forecast".dbo.Forecasts&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//LOAD SUPPLIER&lt;BR /&gt;Supplier:&lt;BR /&gt;load *&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Supplier".dbo.Suppliers&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FinalData:&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident ITEM;&lt;/P&gt;&lt;P&gt;Concatenate(FinalData)&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident STOCK;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Concatenate(FinalData)&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident FORECAST;&lt;/P&gt;&lt;P&gt;Concatenate(FinalData)&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident Supplier;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// DROP TEMP TABLES&lt;BR /&gt;DROP Tables ITEM, STOCK, FORECAST, Supplier&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;// Save QVD as Date&lt;BR /&gt;STORE FinalData INTO C:\Users\TEST\QVD Test_$(vToday).qvd (qvd);&lt;/P&gt;&lt;P&gt;// DROP TABLE&lt;BR /&gt;DROP Table FinalData;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// LOAD ALL QVD&lt;BR /&gt;FOR EACH vFile IN FileList('C:\Users\TEST\QVD Test_$(vToday).qvd')&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(vFile)] (qvd);&lt;BR /&gt;NEXT vFile;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 May 2025 18:16:09 GMT</pubDate>
    <dc:creator>andreasthisell</dc:creator>
    <dc:date>2025-05-13T18:16:09Z</dc:date>
    <item>
      <title>Store tables into one QVD</title>
      <link>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2517690#M105960</link>
      <description>&lt;P&gt;I have several tables in my Qlik today.&lt;BR /&gt;It contains data from article register, forecast, stock etc.&lt;/P&gt;&lt;P&gt;When I run my qvw i have today it shows todays information.&lt;/P&gt;&lt;P&gt;I want to load all data from all tables, store them all in one QVD file, save as for example 2025-05-13-20:00 and drop all tables.&lt;/P&gt;&lt;P&gt;Afterwards I would like to select from all stored QVDs in my qvw to look at the values ​​that were according to the saved QVD files date/time, this to compare values from each day.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is this possible?&lt;/P&gt;&lt;P&gt;I've tried below but haven't quite managed to achieve what I'm looking for.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are there other simpler scripts that solve this, other than the one I've already tried below?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//LOAD ITEM&lt;BR /&gt;Item:&lt;BR /&gt;load&lt;BR /&gt;ITNO as %ArtNr,&lt;BR /&gt;ITDS as Itemdisc&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt;ITNO, ITDS&lt;BR /&gt;FROM "PRD".dbo.Items&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//LOAD STOCK&lt;BR /&gt;left Join (Item)&lt;BR /&gt;load&lt;BR /&gt;2ITNO as %ArtNr,&lt;BR /&gt;2STQT as Stock&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt;2ITNO, 2STQT&lt;BR /&gt;FROM "PRD".dbo.Stocks&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//LOAD FORECAST&lt;BR /&gt;Forecast:&lt;BR /&gt;load *&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Forecast".dbo.Forecasts&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//LOAD SUPPLIER&lt;BR /&gt;Supplier:&lt;BR /&gt;load *&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Supplier".dbo.Suppliers&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FinalData:&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident ITEM;&lt;/P&gt;&lt;P&gt;Concatenate(FinalData)&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident STOCK;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Concatenate(FinalData)&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident FORECAST;&lt;/P&gt;&lt;P&gt;Concatenate(FinalData)&lt;BR /&gt;LOAD *,&lt;BR /&gt;'$(vToday)' as SnapshotDate&lt;BR /&gt;Resident Supplier;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// DROP TEMP TABLES&lt;BR /&gt;DROP Tables ITEM, STOCK, FORECAST, Supplier&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;// Save QVD as Date&lt;BR /&gt;STORE FinalData INTO C:\Users\TEST\QVD Test_$(vToday).qvd (qvd);&lt;/P&gt;&lt;P&gt;// DROP TABLE&lt;BR /&gt;DROP Table FinalData;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// LOAD ALL QVD&lt;BR /&gt;FOR EACH vFile IN FileList('C:\Users\TEST\QVD Test_$(vToday).qvd')&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(vFile)] (qvd);&lt;BR /&gt;NEXT vFile;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 18:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2517690#M105960</guid>
      <dc:creator>andreasthisell</dc:creator>
      <dc:date>2025-05-13T18:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Store tables into one QVD</title>
      <link>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2517696#M105961</link>
      <description>&lt;P&gt;You would need to concatenate your tables into a single table in order to save them as one QVD. This approach is typically not a good idea.&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 18:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2517696#M105961</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2025-05-13T18:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Store tables into one QVD</title>
      <link>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2517754#M105971</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/322928"&gt;@andreasthisell&lt;/a&gt;&amp;nbsp;Write Union in query then store in single qvd or run parallel task for each query store them in different QVDs and then concatenate those QVDs into single.&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 10:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2517754#M105971</guid>
      <dc:creator>Bhushan_Mahajan</dc:creator>
      <dc:date>2025-05-14T10:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Store tables into one QVD</title>
      <link>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2518091#M106035</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/322928"&gt;@andreasthisell&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If I get you right, you are doing data snapshots. There are multiple ways to do that and the approach you take depends on how big your data is and how frequently you run your Snapshots.&lt;/P&gt;&lt;P&gt;First of all, you cannot store multiple independent tables into a single QVD file. For that, you could try Parquet files.&lt;/P&gt;&lt;P&gt;Your approach of concatenating all tables into a single one is not recommended and there is a high change - if not 100% - of bad performance and wrong results. Concatenating is recommended when you need to combine different sets of records of tables with the same structure (fields).&lt;/P&gt;&lt;P&gt;For simple Snapshots, I would recommend something like this. I will use Suppliers as an example:&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;SET vSupplierQVD = 'C:\Users\TEST\Supplier.qvd';&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;Supplier:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;SQL SELECT&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; *,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; '$(vToday)' as SnapshotDate&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;FROM&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; "Supplier".dbo.Suppliers&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;// Check if Supplier QVD exists&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;If Not IsNull(QvdCreateTime('$(vSupplierQVD)')) Then&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; // Load from existing QVD&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; Supplier:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; LOAD * FROM [$(vSupplierQVD)](qvd);&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;End If&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;STORE Supplier INTO [$(vSupplierQVD)](qvd);&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;// Drop the table to free up memory&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;DROP TABLE Supplier;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In this approach, you save a table snapshot into a single QVD file. You could also save each table snapshot in a unique QVD file with the snapshot table suffix, like&amp;nbsp;&lt;SPAN&gt;'C:\Users\TEST\Supplier_&lt;FONT face="courier new,courier"&gt;$(vToday)&lt;/FONT&gt;.qvd' but this can end in thousands of files that will slows down your load performance.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;An advanced approach would be creating&amp;nbsp;"Type 2 Slowly Changing Dimension" tables. You can research this topic and see if it fits your requirements.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Mark Costa&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 17 May 2025 01:08:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Store-tables-into-one-QVD/m-p/2518091#M106035</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2025-05-17T01:08:21Z</dc:date>
    </item>
  </channel>
</rss>

