<?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: Load tables from sql in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518898#M106158</link>
    <description>&lt;P&gt;Such structure might be loaded per:&lt;/P&gt;&lt;P&gt;t: load Table, concat(Field, ',') as Fields from XLSX where Required = 1 group by Table;&lt;/P&gt;&lt;P&gt;for i = 0 to noofrows('t') - 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp;let t = peek('Table', $(i), 't');&lt;BR /&gt;&amp;nbsp; &amp;nbsp;let f = peek('Fields', $(i), 't');&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;and if the data-set are really huge you may add like above hinted appropriate where-clauses and/or extending the logic by implementing an incremental approach, for example storing the max. date from each load in a variable and then only loading newer data and adding them to the historic ones. There are a lot of possibilities to reduce the workload of the data-base - of course by increasing the complexity ...&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 May 2025 16:20:22 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2025-05-23T16:20:22Z</dc:date>
    <item>
      <title>Load tables from sql</title>
      <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518859#M106146</link>
      <description>&lt;P&gt;Experts!&lt;/P&gt;&lt;P&gt;I'm loading multiple tables at once using &lt;STRONG&gt;for loop and working fine,&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;below is the my script.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;SQL USE Test;&lt;/DIV&gt;&lt;DIV&gt;ListOfTables:&lt;/DIV&gt;&lt;DIV&gt;LOAD&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RowNo() AS SrNo,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TableName&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;FROM&lt;/DIV&gt;&lt;DIV&gt;[Tables.xlsx]&lt;/DIV&gt;&lt;DIV&gt;(ooxml, embedded labels, table is Sheet1);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Temp:&lt;/DIV&gt;&lt;DIV&gt;LOAD&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;MAX(SrNo) AS NoOfTables&lt;/DIV&gt;&lt;DIV&gt;RESIDENT ListOfTables;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;LET vNoOfTables= FieldValue('NoOfTables',1);&lt;/DIV&gt;&lt;DIV&gt;DROP TABLE Temp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;FOR i=1 to $(vNoOfTables)&lt;/DIV&gt;&lt;DIV&gt;LET vTable=FieldValue('TableName',$(i));&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;$(vTableName):&lt;/DIV&gt;&lt;DIV&gt;SQL SELECT * FROM $(vTable);&lt;/DIV&gt;&lt;DIV&gt;STORE [$(vTable)] INTO $(vTable).QVD (QVD);&lt;/DIV&gt;&lt;DIV&gt;DROP TABLE [$(vTable)];&lt;/DIV&gt;&lt;DIV&gt;NEXT i&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;but my users are asking to load only required columns, is there any possibility ?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 12:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518859#M106146</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2025-05-23T12:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables from sql</title>
      <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518866#M106147</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41280"&gt;@paulwalker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using SELECT with the * character.&lt;BR /&gt;This will return all existing fields in the SQL table.&lt;/P&gt;&lt;P&gt;Simply insert the required fields by removing the character.&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;BR /&gt;FieldA,&lt;BR /&gt;FieldB,&lt;BR /&gt;FieldC&lt;BR /&gt;FROM $(vTable);&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Matheus&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 May 2025 13:02:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518866#M106147</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2025-05-23T13:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables from sql</title>
      <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518870#M106148</link>
      <description>&lt;P&gt;fields should be automated..&amp;nbsp;&lt;/P&gt;&lt;P&gt;let say Category Table has 3 fields and&amp;nbsp;Product table has 10 fields.&lt;/P&gt;&lt;P&gt;If I keep all the column names it will through an error.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 13:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518870#M106148</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2025-05-23T13:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables from sql</title>
      <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518871#M106149</link>
      <description>&lt;P&gt;Yes, it's possible to apply something like this:&lt;/P&gt;&lt;DIV&gt;$(vTableName):&lt;/DIV&gt;&lt;DIV&gt;SQL SELECT &lt;STRONG&gt;$(vFields)&lt;/STRONG&gt; FROM $(vTable) &lt;STRONG&gt;where $(vMyConditions)&lt;/STRONG&gt;;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The information must only be loaded in some way and then assigned to the variables. In your case maybe just added within the table-list Excel, like:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Table&amp;nbsp; &amp;nbsp;Fields&amp;nbsp; &amp;nbsp;Conditions&lt;BR /&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F1, F2&amp;nbsp; Year &amp;gt;= 2024&lt;BR /&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F1, F3&amp;nbsp; 1 = 1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;but there are also other ways like providing the information as rows and using concat() aggregations to create the lists. Depending on the data-base and their syntax-rules it might need some efforts to differentiate between fields, functions, numbers and strings to apply the right quote/bracket-wrapping. Because of the fact that there are duplicates possible within the fields or conditions you should switch the query from fieldvalue() to peek().&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 13:17:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518871#M106149</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-05-23T13:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables from sql</title>
      <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518878#M106153</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41280"&gt;@paulwalker&lt;/a&gt;&amp;nbsp;, one thing is creating the QVDs, that usually store all the columns, and then users, or in a users App, you load just the required fields.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 13:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518878#M106153</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2025-05-23T13:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables from sql</title>
      <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518891#M106156</link>
      <description>&lt;P&gt;Yes, your correct.&lt;/P&gt;&lt;P&gt;but It is taking more time to load all the tables into QVD's (Many tables have description kind of data and QVD's size also it's huge like showing GB's).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just this is my thought, if I create like below structure (Required column is like flag, 1 should be required column and 0 we don't require - in future if we want any column just change 0 to 1)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paulwalker_0-1748012828469.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/180759i887D60F121F5E30B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="paulwalker_0-1748012828469.png" alt="paulwalker_0-1748012828469.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 15:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518891#M106156</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2025-05-23T15:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables from sql</title>
      <link>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518898#M106158</link>
      <description>&lt;P&gt;Such structure might be loaded per:&lt;/P&gt;&lt;P&gt;t: load Table, concat(Field, ',') as Fields from XLSX where Required = 1 group by Table;&lt;/P&gt;&lt;P&gt;for i = 0 to noofrows('t') - 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp;let t = peek('Table', $(i), 't');&lt;BR /&gt;&amp;nbsp; &amp;nbsp;let f = peek('Fields', $(i), 't');&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;and if the data-set are really huge you may add like above hinted appropriate where-clauses and/or extending the logic by implementing an incremental approach, for example storing the max. date from each load in a variable and then only loading newer data and adding them to the historic ones. There are a lot of possibilities to reduce the workload of the data-base - of course by increasing the complexity ...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 16:20:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-tables-from-sql/m-p/2518898#M106158</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-05-23T16:20:22Z</dc:date>
    </item>
  </channel>
</rss>

