<?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: Bring in data unique to project with for Loop, and variable. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664821#M1318527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, but I do not know what you mean. You are saying create a variable for original name of field and give it a variable for Alias. But do not do it in the SQL? I think you are suggesting to do it in the excel sheet, not sure how to do it in there. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 15:59:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-28T15:59:18Z</dc:date>
    <item>
      <title>Bring in data unique to project with for Loop, and variable.</title>
      <link>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664819#M1318525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;I need some help. I am trying to bring in data from multiple databases which I have done using the following code. The database names are taken from a excel sheet and a variable is used in the connection string. That’s all fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 9.0pt; font-family: 'Courier New';"&gt;Where I am running in to trouble is for example. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #0000ff;"&gt;Each DB has a table called td.Bug and in each they have the same columns. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #0000ff;"&gt;Example: Column 1, Column 2, Column 3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #0000ff;"&gt;I pull the info using a variable and a “for loop”. The issue is in some tables, Column 1 can = Developer name, but in another table in another DB but same column name “Column 1” might = Date. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Right now when I bring it in, Qlikview will bring in “Column 1” and it will have Developer names and Dates, but I need them to be separate because different projects use different information.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(Not sure why this was not thought of when making the DB table for each project, I’m just trying to clean it up on the front end.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Is there anything I can do in my current code that would help in getting the result I want?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;BTW, I am a beginner at coding and Qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Code so far----------v&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Defects:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;ProjectName&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;DatabaseName&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;AdditionDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;WorkRequest&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;H&gt;&lt;BR /&gt; (&lt;/H&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;embedded&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;table&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; Sheet1)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Not&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;ProjectName&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// fill variable with field values row by row&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;For&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 0 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;To&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;NoOfRows&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('Defects')-1&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vDatabaseName&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('DatabaseName', &lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'Defects');&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vProjectName&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('ProjectName', &lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'Defects');&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vAdditionDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('AdditionDate', &lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'Defects');&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vWorkRequest&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('WorkRequest', &lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, 'Defects');&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;trace&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vDatabaseName)&lt;/EM&gt;&lt;/STRONG&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vProjectName)&lt;/EM&gt;&lt;/STRONG&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vAdditionDate)&lt;/EM&gt;&lt;/STRONG&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vWorkRequest)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// .......... use connection string&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;OLEDB&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;CONNECT32&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Provider=SQLOLED6.1;Persist Security Info=True;User ID=BI_QLIKVIEW;Initial Catalog=$(vDatabaseName);Data Source=SDBDCA1P;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=OPT0;Use Encryption for Data=False;Tag with column collation when possible=False]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;XPASsword&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;Let&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;vDefectsTableName&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 'Defects'; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Define Table Name&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//Extract&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vDefectsTableName)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;:&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Load everything in to table variable&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp; *; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Get information from Table in database&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;SELECT '$(vProjectName)' AS ProjectName,'$(vAdditionDate)' AS AdditionDate,'$(vWorkRequest)' AS WorkRequest, bug.*&lt;BR /&gt; &lt;BR /&gt; FROM td.BUG as bug;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;/*Defect*/&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;next&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//Exit Script;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;STORE&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vDefectsTableName)&lt;/EM&gt;&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;INTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ..\..\02_QVDs\IT\IT_QC_Defects.qvd (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;QVD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664819#M1318525</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Bring in data unique to project with for Loop, and variable.</title>
      <link>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664820#M1318526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of defining static alias names in your SQL statement use variables for the aliases also and define them in your &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;QCProjects.xlsx&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT $(vOrigName) as $(vAliasName) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 21:40:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664820#M1318526</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-08-27T21:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Bring in data unique to project with for Loop, and variable.</title>
      <link>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664821#M1318527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, but I do not know what you mean. You are saying create a variable for original name of field and give it a variable for Alias. But do not do it in the SQL? I think you are suggesting to do it in the excel sheet, not sure how to do it in there. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 15:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664821#M1318527</guid>
      <dc:creator />
      <dc:date>2014-08-28T15:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bring in data unique to project with for Loop, and variable.</title>
      <link>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664822#M1318529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 9.5pt;"&gt;In the SQL database I can run this query below and it gets me the labels for each column, names that should of been used but they are kept in there &lt;/SPAN&gt;separately&lt;SPAN style="font-size: 9.5pt;"&gt; for some reason. Is there a way I can use this in Qlikview and bring in the &lt;/SPAN&gt;actual&lt;SPAN style="font-size: 9.5pt;"&gt; names. I want to use that to give the &lt;/SPAN&gt;columns&lt;SPAN style="font-size: 9.5pt;"&gt; that have same name in db but different data to be &lt;/SPAN&gt;separate&lt;SPAN style="font-size: 9.5pt;"&gt; columns in qlikview. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: blue;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: blue;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: blue;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas;"&gt; &lt;SPAN style="color: teal;"&gt;[SF_COLUMN_NAME]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: gray;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'as '&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="color: fuchsia;"&gt;Replace&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;[SF_USER_LABEL]&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: red;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: red;"&gt;'_'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="color: red;"&gt;','&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;user_label&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;[td]&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;[SYSTEM_FIELD]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;sf_table_name&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: red;"&gt;'bug'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: gray;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;sf_user_label&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;is&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;not&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;null)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: gray; font-size: 9.5pt; font-family: Consolas;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: gray; font-size: 9.5pt; font-family: Consolas;"&gt;&lt;IMG alt="Pic 1.png" class="jive-image" src="/legacyfs/online/65506_Pic 1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 16:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bring-in-data-unique-to-project-with-for-Loop-and-variable/m-p/664822#M1318529</guid>
      <dc:creator />
      <dc:date>2014-08-28T16:14:39Z</dc:date>
    </item>
  </channel>
</rss>

