<?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 looping a script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443466#M165309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I got to fetch data from several servers that contain the same database schema (i.e. same table names,etc...) &lt;/P&gt;&lt;P&gt;I want to change the connection string on each loop and save each table in a distinct qvd&lt;/P&gt;&lt;P&gt;what I want to parameterize is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;OLEDB&lt;/SPAN&gt; &lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;CONNECT&lt;/STRONG&gt; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[Provider=SQLOLEDB.1;Persist Security Info=False;Data Source=&lt;SPAN style="background-color: yellow;"&gt;entUAE&lt;/SPAN&gt;;Initial Catalog=PS_DEV;User ID=RO;Password=RO;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=HANI-SAGHEER;Use Encryption for Data=False;Tag with column collation when possible=False]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;;&lt;BR /&gt;F4311:&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; *;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; &lt;BR /&gt;Select dbo.fn_ConvertJulianToDate(PDTRDJ) as PDDATE, * from testdta.F4311 where PDDCTO in ('OM','OC','OL');&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;store&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; F4311 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;into&lt;/SPAN&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(vQvdPath)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;F4311&lt;SPAN style="background-color: yellow;"&gt;_&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon; background-color: yellow;"&gt;ent&lt;/SPAN&gt;&lt;SPAN style="background-color: yellow; font-size: 9pt; font-family: 'Courier New';"&gt;UAE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;.qvd(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;qvd&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;);&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;DROP&lt;/STRONG&gt; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; F4311;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;the info in yellow highlight will change according to the loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2012 11:06:01 GMT</pubDate>
    <dc:creator>ali_hijazi</dc:creator>
    <dc:date>2012-09-26T11:06:01Z</dc:date>
    <item>
      <title>looping a script</title>
      <link>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443466#M165309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I got to fetch data from several servers that contain the same database schema (i.e. same table names,etc...) &lt;/P&gt;&lt;P&gt;I want to change the connection string on each loop and save each table in a distinct qvd&lt;/P&gt;&lt;P&gt;what I want to parameterize is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;OLEDB&lt;/SPAN&gt; &lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;CONNECT&lt;/STRONG&gt; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[Provider=SQLOLEDB.1;Persist Security Info=False;Data Source=&lt;SPAN style="background-color: yellow;"&gt;entUAE&lt;/SPAN&gt;;Initial Catalog=PS_DEV;User ID=RO;Password=RO;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=HANI-SAGHEER;Use Encryption for Data=False;Tag with column collation when possible=False]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;;&lt;BR /&gt;F4311:&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; *;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; &lt;BR /&gt;Select dbo.fn_ConvertJulianToDate(PDTRDJ) as PDDATE, * from testdta.F4311 where PDDCTO in ('OM','OC','OL');&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;store&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; F4311 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;into&lt;/SPAN&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(vQvdPath)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;F4311&lt;SPAN style="background-color: yellow;"&gt;_&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon; background-color: yellow;"&gt;ent&lt;/SPAN&gt;&lt;SPAN style="background-color: yellow; font-size: 9pt; font-family: 'Courier New';"&gt;UAE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;.qvd(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;qvd&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;);&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;DROP&lt;/STRONG&gt; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; F4311;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;the info in yellow highlight will change according to the loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2012 11:06:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443466#M165309</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2012-09-26T11:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: looping a script</title>
      <link>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443467#M165310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;You can use 'for' statement to loop it.&lt;/P&gt;&lt;P&gt;Also you could create an inline table with serverNames to pick one for each iteration with fieldvalue() or peek() functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2012 11:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443467#M165310</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-26T11:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: looping a script</title>
      <link>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443468#M165311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using peek or fieldvalue works for the load script as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('tables')-1 &lt;/P&gt;&lt;P&gt;LET sheetName = 'vDolphin.dbo.' &amp;amp; peek('name',i,'tables');&lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;sql select * from $(sheetName);&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how can I make the connection string in the ODBC Connect or OLEDB Connect dynamic?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2012 11:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443468#M165311</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2012-09-26T11:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: looping a script</title>
      <link>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443469#M165312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;as for the connection string you can store the connection strings in txt files and inside the for loop you can read the desired txt file using the following command:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;$(Include=$(i).txt); &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2012 11:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443469#M165312</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2012-09-26T11:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: looping a script</title>
      <link>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443470#M165313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also use the same approach as with $(vQvdPath).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2012 13:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/looping-a-script/m-p/443470#M165313</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-26T13:05:33Z</dc:date>
    </item>
  </channel>
</rss>

