<?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 SQL to Qlikview Friendly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302142#M1197382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no I cannot see what is wrong in your sql statement. You need to check this against your original data source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you are getting into this you should add another tool to your developement kitbag. This would be a database tool. It is much quicker to work out sql issues directly on the database the data comes from.&lt;/P&gt;&lt;P&gt;I use a tool called Toad - look it up on google. You'll need to get the version that goes with whichever dbms - sybase it seems to be given one of your earlier posts -&amp;nbsp; you are using. &lt;/P&gt;&lt;P&gt;This is very useful for debugging sql issues. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are not qlikview issues but as Steve Dark points out in his recent blog&amp;nbsp; &lt;A href="http://www.quickintelligence.co.uk/what-makes-a-qlikview-developer/"&gt;http://www.quickintelligence.co.uk/what-makes-a-qlikview-developer/&lt;/A&gt; a Qlikview developer needs to have several strings to his/her bow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep persevering, you'll get there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 May 2011 12:01:39 GMT</pubDate>
    <dc:creator>pat_agen</dc:creator>
    <dc:date>2011-05-18T12:01:39Z</dc:date>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302134#M1197374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of the company developers sent through the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOB.JOB_DATE,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOB.JOB_NO,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PACKDET.PO_NO,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VOLUME = SUM(PACKDET.NETQUANTITY * PRODUCT.VOLUME),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PCS = SUM(PACKDET.NETQUANTITY),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS = CASE WHEN JOB.CONFIRMED = 'Y' THEN 'CONFIRMED'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN JOB.ALLOCATED = 'Y' THEN 'IN PROGRESS'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE 'NOT YET ALLOCATED' END,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOB.PRIN_CODE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;FROM JOB, PACKDET, PRODUCT&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;WHERE JOB.JOB_TYPE ='IMP' &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;AND&amp;nbsp;&amp;nbsp; CONVERT(DATE,JOB.JOB_DATE) &amp;gt;='01/01/2011'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;AND&amp;nbsp;&amp;nbsp; JOB.PRIN_CODE = PACKDET.PRIN_CODE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;AND&amp;nbsp;&amp;nbsp; JOB.JOB_NO&amp;nbsp; = PACKDET.JOB_NO&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;AND&amp;nbsp;&amp;nbsp; PACKDET.PRIN_CODE = PRODUCT.PRIN_CODE &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;AND&amp;nbsp;&amp;nbsp; PACKDET.PROD_CODE = PRODUCT.PROD_CODE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;GROUP BY JOB.JOB_DATE,JOB.JOB_NO,PACKDET.PO_NO,JOB.PRIN_CODE,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CASE WHEN JOB.CONFIRMED = 'Y' THEN 'CONFIRMED'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN JOB.ALLOCATED = 'Y' THEN 'IN PROGRESS'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE 'NOT YET ALLOCATED' END&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt;ORDER BY JOB.JOB_DATE,JOB.JOB_NO,PACKDET.PO_NO&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000cc; font-size: 10pt; font-family: 'Courier New'; font-weight: bold;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How do I best convert this to be Qlikview friendly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, I could import a table for the Job_Details: by JOB_NO and JOB_DATE and use a WHERE clause to limit the dates to &amp;gt;=01/01/2011.&amp;nbsp; I then create a second table called Packing_Details: which would effectively hold multiple line items per job, but how do I limit these so that I only import those JOB_NOs that have already been imported into Job_Details:?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate the Community help on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 12:05:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302134#M1197374</guid>
      <dc:creator />
      <dc:date>2011-05-16T12:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302135#M1197375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was intrigued by your post. What do you mean make this qlikview friendly? Apart from some syntaxe I am unfamiliar with (the use of the "=" sign in the list of fields) this looks like fairly standard sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you used this in a qv document you woud pick up a table with seven fields (JOB_DATE thru PRIN_CODE) and then you would do whateaver you wished to in qv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have access to the DBMS and you wanted to break up the sql join you coudl write soem code as follows (be aware this is not tested):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LoadJobs:&lt;BR /&gt;load&lt;BR /&gt; JOB_DATE as Jobdate,&lt;BR /&gt; JOB_NO as JobNo,&lt;BR /&gt; PRIN_CODE as PrinCode,&lt;BR /&gt; if(CONFIRMED = 'Y','CONFIRMED',&lt;BR /&gt;&amp;nbsp; if(ALLOCATED = 'Y','IN PROGRESS',&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 'NOT YET ALLOCATED'))&amp;nbsp; as&amp;nbsp; Jobstatus,&lt;BR /&gt; JOB_NO &amp;amp; '|' &amp;amp; PRIN_CODE&amp;nbsp; as packDetKey&lt;BR /&gt; ;&lt;BR /&gt; &lt;BR /&gt;sql select &lt;BR /&gt; JOB.JOB_DATE,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOB.JOB_NO,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOB.PRIN_CODE,&lt;BR /&gt; JOB.CONFIRMED,&lt;BR /&gt; JOB.ALLOCATED&lt;BR /&gt;from JOB&lt;BR /&gt;WHERE JOB.JOB_TYPE ='IMP' &lt;BR /&gt;AND&amp;nbsp;&amp;nbsp; CONVERT(DATE,JOB.JOB_DATE) &amp;gt;='01/01/2011';&lt;/P&gt;&lt;P&gt;LoadPackDet:&lt;BR /&gt;load &lt;BR /&gt; JOB_NO &amp;amp; '|' &amp;amp; PRIN_COD&amp;nbsp; as packDetKey,&lt;BR /&gt; PROD_CODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as prodKey,&lt;BR /&gt; PO_NO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as PONo,&lt;BR /&gt; NETQUANTITY&amp;nbsp;&amp;nbsp;&amp;nbsp; as NetQuantity&lt;BR /&gt;where exists(packDetKey,JOB_NO &amp;amp; '|' &amp;amp; PRIN_COD)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;sql select &lt;BR /&gt; JOB_NO,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRIN_CODE,&lt;BR /&gt; PO_NO,&lt;BR /&gt; NETQUANTITY&lt;BR /&gt;from PACKDET;&lt;/P&gt;&lt;P&gt;LoadProduct:&lt;BR /&gt;load &lt;BR /&gt; PROD_CODE&amp;nbsp;&amp;nbsp; as prodKey,&lt;BR /&gt; VOLUME&amp;nbsp;&amp;nbsp;&amp;nbsp; as volume&lt;BR /&gt;where exists(prodKey,PROD_CODE)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;sql select &lt;BR /&gt; PROD_CODE,&lt;BR /&gt; VOLUME&lt;BR /&gt;from PRODUCT ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2011 07:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302135#M1197375</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-17T07:59:35Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302136#M1197376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Pat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try the combined code next, but what you have suggested is exactly what I am trying to do.&amp;nbsp; I have loaded part of my script below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inbound_Job:&lt;BR /&gt;LOAD&lt;BR /&gt; // Load Table Keys&lt;BR /&gt; JOB_DATE&amp;nbsp;&amp;nbsp; As [Key Inbound_Job JOB_DATE],&lt;BR /&gt; JOB_NO&amp;amp;'|'&amp;amp;PRIN_CODE&amp;nbsp; As PackDetKey,&lt;BR /&gt; // Load Table Data&lt;BR /&gt; JOB_DATE&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_DATE],&lt;BR /&gt; JOB_NO&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_NO],&lt;BR /&gt; PRIN_CODE&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PRIN_CODE],&lt;BR /&gt; If(COMPLETED ='Y','Completed',If(CONFIRMED='Y','Confirmed',If(ALLOCATED ='Y','Allocated','In Progress'))) As [Inbound_Job JOB_STAT];&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM GACWAREDB.dbo.JOB WHERE JOB.JOB_TYPE='IMP'&lt;BR /&gt;AND CONVERT(DATE,JOB.JOB_DATE)&amp;gt;='01/01/2011';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Packing_Details:&lt;BR /&gt;LOAD&lt;BR /&gt; // Load Table Keys&lt;BR /&gt; JOB_NO&amp;amp;'|'&amp;amp;PRIN_CODE&amp;nbsp; As PackDetKey,&lt;BR /&gt; // Load Table Data&lt;BR /&gt; JOB_NO&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_NO],&lt;BR /&gt; PO_NO&amp;nbsp;&amp;nbsp; As [Inbound_Job PO_NO],&lt;BR /&gt; PRIN_CODE&amp;nbsp; As [Inbound_Job PRIN_CODE],&lt;BR /&gt; PROD_CODE&amp;nbsp; As [Inbound_Job PROD_CODE],&lt;BR /&gt; NETQUANTITY&amp;nbsp; As [Inbound_Job NETQUANTITY];&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM GACWAREDB.dbo.PACKDET WHERE EXISTS (PackDetKey,JOB_NO&amp;amp;'|'&amp;amp;PRIN_CODE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I am getting a Syntax error from the Script Editor when it hits the PackDetKey in the WHERE EXISTS select statement.&amp;nbsp; I have attached a screenshot of the error.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QV Script Error.bmp" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/4448_QV+Script+Error.bmp" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Much appreciated . . . I will try the join next.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 07:30:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302136#M1197376</guid>
      <dc:creator />
      <dc:date>2011-05-18T07:30:49Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302137#M1197377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look carefully at the code I sent. The exists() command was used in the Load statements. This is qlikview syntax (albeit untested by myself). You have put the exits command in your sql statement. And this is being kicked back. I don't know details of sql syntax for sybase I just know that going through ODBC links you are best off sticking to basic sql. Let qlikview handle the interesting/sohisticated stuff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it as I coded it and see if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 07:38:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302137#M1197377</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-18T07:38:30Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302138#M1197378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Pat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Okay, thanks for that - worked a treat . . . seem to have generated a synthetic key that was unintended, but should be able to sort that out.&amp;nbsp; I have not used SQL since I left university in 1989 . . . but as I am trying to reinvent myself I am having to roll up the sleeves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the benefit of a complete novice, but one who is eager to learn, can you briefly explain the difference between LOAD and SELECT?&amp;nbsp; Does one have to precede the other (LOAD and then SELECT I would presume)?&amp;nbsp; Is there an implicit LOAD in your code?&amp;nbsp; Where does the QV code start and stop and what is sent through to the SQL driver to communicate withthe DB?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I be able to run the initial code posted from within QV?&amp;nbsp; In other words, I have only ever loaded single tables and used a key field to link them.&amp;nbsp; Being able to build a single table from 3 database tables upfront could simplify my data model considerably.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yikes, re-reading this, I realise how little I know and what a beginner I sound like, but I guess that is what happens when you start from scratch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 07:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302138#M1197378</guid>
      <dc:creator />
      <dc:date>2011-05-18T07:53:01Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302139#M1197379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For starters an extremely useful ressource is the "help" button inside qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example the sql part(s) is/are all the commands beginning with "sql" in my code. Basically this is just requesting the database to send back , via the odbc link, the fields requested. Outside of these commands everything is Qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The load statement that precedes an "sql select" tells qlikview what to do with the dataset the sql will send back to it. This, I think, is one of the really good points in qv. You learn the qv syntax and with just basic sql knowledge you can start to do some really interesting stuff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your last question &lt;/P&gt;&lt;P&gt;"Should I be able to run the initial code posted from within QV? " was why I replied to your mail in the first place as your post was entitled "how to make this friendly". In fact there is nothing unfriendly about it. If that is a bona fide sql query that the odbc driver for your database can handle then just put it straight into qlikview preceeding it by the "sql" keyword. If you want to do further data processing (renaming fileds, doing some "if .. else" transformations etc. etc.)&amp;nbsp; on the result set then use a preceding load statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QV offers huge possibilities to transform your original data set because you are basically passing your data through a programme during the refresh cycle, your sql query (or load from xl or whatever datasource you are going against) is just the starting point - you are not just limited to preceeding load staements by the way - and even after that the UI offers even further possibilities through set analysis and so on to go an extra mile. With pure sql the answer has to be in the query which means things can get extremely complicated as the data is pulled this way and that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I see you only got out of uni a little time ago you've got plenty of time to learn &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;happy qliking.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 09:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302139#M1197379</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-18T09:19:21Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302140#M1197380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been using the help and the detailed 1400+ page manual . . . sometimes it just needs the steer of a person though to get you on the straight and narrow.&amp;nbsp; I also understand the LOAD and SELECT statements much better.&amp;nbsp; Thanks a million.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My next step is to try and get the SQL code as supplied to work - as this will as you pointed out give me a table with 7 columns and I do not even have to bring some of the data into QV.&amp;nbsp; I can see that there could be a case for either depending on your need.&amp;nbsp; Right now it would be beneficial to be able to do the joins within the SQL and only create the 7 table column.&amp;nbsp; I have re-written the inital SQL to include both explicit LOAD statements and then the SQL almost verbatim as I initially had it at the top of the post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do however get a syntax error as shown as soon as it hits the FROM statement?&amp;nbsp; Any steer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL##f - SqlState: 42000, ErrorCode: 156, ErrorMsg: [DataDirect][ODBC Sybase Wire Protocol driver][SQL Server]Incorrect syntax near the keyword 'FROM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;QV Script&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Inbound_Job:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; // Load Table Keys&lt;/P&gt;&lt;P&gt; JOB.JOB_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Key Inbound_Job JOB_DATE],&lt;/P&gt;&lt;P&gt; JOB.JOB_NO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Key Inbound_Job JOB_NO],&lt;/P&gt;&lt;P&gt; // Load Table Data&lt;/P&gt;&lt;P&gt; JOB.JOB_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_DATE],&lt;/P&gt;&lt;P&gt; JOB.JOB_NO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_NO],&lt;/P&gt;&lt;P&gt; JOB.PRIN_CODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PRIN_CODE],&lt;/P&gt;&lt;P&gt; PACKDET.PO_NO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PO_NO],&lt;/P&gt;&lt;P&gt; STATUS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_STAT],&lt;/P&gt;&lt;P&gt; VOLUME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PO_NO],&lt;/P&gt;&lt;P&gt; PIECES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PO_NO];&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;SELECT JOB.JOB_DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; JOB.JOB_NO,&lt;/P&gt;&lt;P&gt;&amp;nbsp; JOB.PRIN_CODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; PACKDET.PO_NO,&lt;/P&gt;&lt;P&gt;&amp;nbsp; VOLUME = SUM(PACKDET.NETQUANTITY*PRODUCT.VOLUME),&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIECES =SUM(PACKDET.NETQUANTITY),&lt;/P&gt;&lt;P&gt;&amp;nbsp; STATUS = CASE WHEN JOB.COMPLETED ='Y' THEN 'Completed'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN JOB.CONFIRMED='Y' THEN 'Confirmed'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN JOB.ALLOCATED ='Y' THEN 'Allocated'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE 'In Progress' END,&lt;/P&gt;&lt;P&gt;FROM GACWAREDB.dbo.JOB, GACWAREDB.dbo.PACKDET, GACWAREDB.dbo.PRODUCT&lt;/P&gt;&lt;P&gt;WHERE JOB.JOB_TYPE='IMP'&lt;/P&gt;&lt;P&gt;AND CONVERT(DATE,JOB.JOB_DATE)&amp;gt;='01/01/2011'&lt;/P&gt;&lt;P&gt;AND JOB.PRIN_CODE=PACKDET.PRIN_CODE&lt;/P&gt;&lt;P&gt;AND JOB.JOB_NO=PACKDET.JOB_NO&lt;/P&gt;&lt;P&gt;AND PACKDET.PRIN_CODE=PRODUCT.PRIN_CODE&lt;/P&gt;&lt;P&gt;AND PACKDET.PROD_CODE=PRODUCT.PROD_CODE&lt;/P&gt;&lt;P&gt;GROUP BY JOB.JOB_DATE,JOB.JOB_NO,PACKDET.PO_NO,JOB.PRIN_CODE,&lt;/P&gt;&lt;P&gt;ORDER BY JOB.JOB_DATE,JOB.JOB_NO,PACKDET.PO_NO;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 10:44:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302140#M1197380</guid>
      <dc:creator />
      <dc:date>2011-05-18T10:44:50Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302141#M1197381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arrggh!&amp;nbsp; Sorry Pat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stupid and simple syntax that I have now sorted so ignore the post above - still working on it, but I am now getting a JOB.JOB_DATE field not found error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can see something I am doing wrong let me know - it will be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current script posted below for clarity:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inbound_Job:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; // Load Table Keys&lt;/P&gt;&lt;P&gt; JOB.JOB_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Key Inbound_Job JOB_DATE],&lt;/P&gt;&lt;P&gt; JOB.JOB_NO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Key Inbound_Job JOB_NO],&lt;/P&gt;&lt;P&gt; // Load Table Data&lt;/P&gt;&lt;P&gt; JOB.JOB_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_DATE],&lt;/P&gt;&lt;P&gt; JOB.JOB_NO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_NO],&lt;/P&gt;&lt;P&gt; JOB.PRIN_CODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PRIN_CODE],&lt;/P&gt;&lt;P&gt; PACKDET.PO_NO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PO_NO],&lt;/P&gt;&lt;P&gt; STATUS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job JOB_STAT],&lt;/P&gt;&lt;P&gt; VOLUME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PO_NO],&lt;/P&gt;&lt;P&gt; PIECES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As [Inbound_Job PO_NO];&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;SELECT JOB.JOB_DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; JOB.JOB_NO,&lt;/P&gt;&lt;P&gt;&amp;nbsp; JOB.PRIN_CODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; PACKDET.PO_NO,&lt;/P&gt;&lt;P&gt;&amp;nbsp; VOLUME = SUM(PACKDET.NETQUANTITY*PRODUCT.VOLUME),&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIECES =SUM(PACKDET.NETQUANTITY),&lt;/P&gt;&lt;P&gt;&amp;nbsp; STATUS = CASE WHEN JOB.COMPLETED ='Y' THEN 'Completed'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN JOB.CONFIRMED='Y' THEN 'Confirmed'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN JOB.ALLOCATED ='Y' THEN 'Allocated'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE 'In Progress' END&lt;/P&gt;&lt;P&gt;// FROM JOB, PACKDET, PRODUCT&lt;/P&gt;&lt;P&gt;FROM GACWAREDB.dbo.JOB, GACWAREDB.dbo.PACKDET, GACWAREDB.dbo.PRODUCT&lt;/P&gt;&lt;P&gt;WHERE JOB.JOB_TYPE='IMP'&lt;/P&gt;&lt;P&gt;AND CONVERT(DATE,JOB.JOB_DATE)&amp;gt;='01/01/2011'&lt;/P&gt;&lt;P&gt;AND JOB.PRIN_CODE=PACKDET.PRIN_CODE&lt;/P&gt;&lt;P&gt;AND JOB.JOB_NO=PACKDET.JOB_NO&lt;/P&gt;&lt;P&gt;AND PACKDET.PRIN_CODE=PRODUCT.PRIN_CODE&lt;/P&gt;&lt;P&gt;AND PACKDET.PROD_CODE=PRODUCT.PROD_CODE&lt;/P&gt;&lt;P&gt;GROUP BY JOB.JOB_DATE,JOB.JOB_NO,PACKDET.PO_NO,JOB.PRIN_CODE&lt;/P&gt;&lt;P&gt;ORDER BY JOB.JOB_DATE,JOB.JOB_NO,PACKDET.PO_NO;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 11:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302141#M1197381</guid>
      <dc:creator />
      <dc:date>2011-05-18T11:13:52Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302142#M1197382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no I cannot see what is wrong in your sql statement. You need to check this against your original data source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you are getting into this you should add another tool to your developement kitbag. This would be a database tool. It is much quicker to work out sql issues directly on the database the data comes from.&lt;/P&gt;&lt;P&gt;I use a tool called Toad - look it up on google. You'll need to get the version that goes with whichever dbms - sybase it seems to be given one of your earlier posts -&amp;nbsp; you are using. &lt;/P&gt;&lt;P&gt;This is very useful for debugging sql issues. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are not qlikview issues but as Steve Dark points out in his recent blog&amp;nbsp; &lt;A href="http://www.quickintelligence.co.uk/what-makes-a-qlikview-developer/"&gt;http://www.quickintelligence.co.uk/what-makes-a-qlikview-developer/&lt;/A&gt; a Qlikview developer needs to have several strings to his/her bow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep persevering, you'll get there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 12:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302142#M1197382</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-18T12:01:39Z</dc:date>
    </item>
    <item>
      <title>SQL to Qlikview Friendly</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302143#M1197383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the encouragement and the pointer to TOAD.&amp;nbsp; Will download later tonight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Managed to work out that QV was complaining about the JOB.JOB_DATE.&amp;nbsp; As soon as I dropped the preceding table name, viola, everything worked.&amp;nbsp; But the process of troubleshooting has increased my understanding and knowledge immensely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the patience and support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 13:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-to-Qlikview-Friendly/m-p/302143#M1197383</guid>
      <dc:creator />
      <dc:date>2011-05-18T13:18:26Z</dc:date>
    </item>
  </channel>
</rss>

