<?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: Converting MS Query to Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603241#M684693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Henric.&lt;/P&gt;&lt;P&gt;This is how it looks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, any suggestions on how to solve:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MSP_EpmProject_UserView."Main Project no"&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MSP_EpmTask_UserView."Project no"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Then, I have created a field called "Task Project" where I bring in Project no if that is filled in, if not, I use Main Project no.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=TRIM(IF([@[Project no]]="";[@[Main Project no]];[@[Project no]]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="52559" alt="2014-02-04_10-58-30.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/52559_2014-02-04_10-58-30.jpg" style="width: 620px; height: 317px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Feb 2014 10:10:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-04T10:10:03Z</dc:date>
    <item>
      <title>Converting MS Query to Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603239#M684691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got a query in Excel to fetch information from our timereporting system.&amp;nbsp; Is there an easy way to convert this query into a load script for Qlik?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am have also added a few fields manually in Excel with formulas.&amp;nbsp; How can I get this into the load script.&amp;nbsp; For example in the query below, I am fetching these two fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MSP_EpmProject_UserView."Main Project no"&lt;/P&gt;&lt;P&gt;MSP_EpmTask_UserView."Project no"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I have created a field called "Task Project" where I bring in Project no if that is filled in, if not, I use Main Project no. &lt;/P&gt;&lt;P&gt;=TRIM(IF([@[Project no]]="";[@[Main Project no]];[@[Project no]]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MSP_EpmAssignmentByDay.TimeByDay, MSP_EpmAssignmentByDay.AssignmentActualWork, MSP_EpmResource_UserView.ResourceName, MSP_EpmResource_UserView."AX-ID", MSP_EpmTask_UserView.TaskName, MSP_EpmProject_UserView.ProjectName, MSP_EpmProject_UserView."Main Project no", MSP_EpmResource_UserView.RBS, MSP_EpmTask_UserView."Activity Type", MSP_EpmTask_UserView."Project no", MSP_EpmTask_UserView."Invoice Type", MSP_EpmTask_UserView.TaskName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM "epm-2010-reporting".dbo.MSP_EpmAssignment MSP_EpmAssignment, "epm-2010-reporting".dbo.MSP_EpmAssignmentByDay MSP_EpmAssignmentByDay, "epm-2010-reporting".dbo.MSP_EpmProject_UserView MSP_EpmProject_UserView, "epm-2010-reporting".dbo.MSP_EpmResource_UserView MSP_EpmResource_UserView, "epm-2010-reporting".dbo.MSP_EpmTask_UserView MSP_EpmTask_UserView&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE MSP_EpmAssignment.AssignmentUID = MSP_EpmAssignmentByDay.AssignmentUID AND MSP_EpmAssignment.ResourceUID = MSP_EpmResource_UserView.ResourceUID AND MSP_EpmProject_UserView.ProjectUID = MSP_EpmAssignmentByDay.ProjectUID AND MSP_EpmAssignment.TaskUID = MSP_EpmTask_UserView.TaskUID AND (MSP_EpmAssignmentByDay.AssignmentActualWork&amp;gt;$0) AND (MSP_EpmProject_UserView."Internal Project"='No')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started working on this, but cannot get it to work.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;OLEDB&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;CONNECT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;TO&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;[Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;User ID="";Initial Catalog=epm-2010-reporting;Data Source=hbg-sql2008;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=HBG-THORH;Initial File Name="";Use Encryption for Data=False;Tag with column collation when possible=False;MARS Connection=False;DataTypeCompatibility=0;Trust Server Certificate=False]&lt;SPAN class="s1"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;month&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;TimeByDay&lt;SPAN class="s1"&gt;) &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Month&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;year&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;TimeByDay&lt;SPAN class="s1"&gt;) &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;[Fiscal Year]&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;AssignmentActualWork&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Hours&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;AssignmentUID&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;ProjectUID&lt;SPAN class="s1"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; SELECT *&lt;BR /&gt; FROM "epm-2010-reporting".dbo.MSP_EpmAssignmentByDay;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;ProjectName&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;EPMProjectName&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;"Main Project no"&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;PROJID&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;ProjectUID&lt;SPAN class="s1"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; SELECT *&lt;BR /&gt; FROM "epm-2010-reporting".dbo.MSP_EpmProject_UserView;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;ProjectUID&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;TaskUID&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;AssignmentUID&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;ResourceUID&lt;SPAN class="s1"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; SELECT *&lt;BR /&gt; FROM "epm-2010-reporting".dbo.MSP_EpmAssignment;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;ResourceName&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;"AX-ID"&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;ResourceUID&lt;SPAN class="s1"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;RBS&lt;SPAN class="s1"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; SELECT *&lt;BR /&gt; FROM "epm-2010-reporting".dbo.MSP_EpmResource_UserView;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;TaskUID&lt;SPAN class="s1"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;TaskName&lt;SPAN class="s1"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;"Project no"&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;PROJID&lt;SPAN class="s1"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;"Activity Type"&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;as&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Activity&lt;SPAN class="s1"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; SELECT *&lt;BR /&gt; FROM "epm-2010-reporting".dbo."MSP_EpmTask_UserView"; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 09:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603239#M684691</guid>
      <dc:creator />
      <dc:date>2014-02-04T09:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Converting MS Query to Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603240#M684692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your approach is correct. But it is impossible for us to say what is going wrong since we do not have the data or the app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check your data model (ctrl-T):&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Make sure that you have loaded the keys between the tables.&lt;/LI&gt;&lt;LI&gt;Make sure that you do not have any synthetic keys (usually a sign that you have fields that link tables, but not are keys)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 09:15:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603240#M684692</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-02-04T09:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Converting MS Query to Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603241#M684693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Henric.&lt;/P&gt;&lt;P&gt;This is how it looks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, any suggestions on how to solve:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MSP_EpmProject_UserView."Main Project no"&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MSP_EpmTask_UserView."Project no"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Then, I have created a field called "Task Project" where I bring in Project no if that is filled in, if not, I use Main Project no.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=TRIM(IF([@[Project no]]="";[@[Main Project no]];[@[Project no]]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="52559" alt="2014-02-04_10-58-30.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/52559_2014-02-04_10-58-30.jpg" style="width: 620px; height: 317px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 10:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603241#M684693</guid>
      <dc:creator />
      <dc:date>2014-02-04T10:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Converting MS Query to Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603242#M684695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You obviously have a problem in your data model, perhaps too many keys. Do the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Switch to "Source Table View" in the table viewer. Now you can see what you really have loaded.&lt;/LI&gt;&lt;LI&gt;Rename the tables (by adding a label in front of the Load in the script). This will not change the data model, but it will help you think. If a table has exactly one record per project, the table should be called "Projects". The same for "Assignments" and "Tasks". If you don't know what each record represents, you need to figure it out.&lt;/LI&gt;&lt;LI&gt;Look at the data model and think. Ask questions like: Are the keys in the right tables? Are there any redundant keys? Are the tables linked correctly? Can there be more than one Assignment per Task? Can a Task belong to several Projects? &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without knowing the data, I cannot answer these questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 10:21:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-MS-Query-to-Load-Script/m-p/603242#M684695</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-02-04T10:21:02Z</dc:date>
    </item>
  </channel>
</rss>

