<?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 Loading in CSV in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291824#M1202771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gordon,&lt;/P&gt;&lt;P&gt;Thanks for your reply, I'm not completely understanding the code though. If i post a sample of my script, could you possibly use my fields?&lt;/P&gt;&lt;P&gt;or maybe just explain what is what?&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Dec 2010 16:28:24 GMT</pubDate>
    <dc:creator>hopkinsc</dc:creator>
    <dc:date>2010-12-02T16:28:24Z</dc:date>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291817#M1202764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I don't think this is possible but i thought i'd ask the question.&lt;/P&gt;&lt;P&gt;I have thousands of stock REASON DESCRIPTIONS. an example of some descriptions are:&lt;BR /&gt;STOCK CHECK&lt;BR /&gt;P/O&lt;BR /&gt;ORDERING&lt;BR /&gt;etc&lt;/P&gt;&lt;P&gt;but the problem is that the description would have a date and time after it, e.g.:&lt;BR /&gt;STOCK CHECK 10/11/10 15:30:01&lt;BR /&gt;This results in thousands of description starting with STOCK CHECKING. I am trying to create a table with just an abreviation of the REASON DESCRIPTION which will then display anything relating to it.&lt;/P&gt;&lt;P&gt;e.g,&lt;/P&gt;&lt;P&gt;New Table:&lt;BR /&gt;Stock Check&lt;BR /&gt;Price Over&lt;BR /&gt;Ordering Adjustment&lt;/P&gt;&lt;P&gt;When 'Stock Check' is selected, All results relating to the REASONDESCRIPTIONS 'STOCK CHECK ....' will be displayed, instead of having to highlight ALL STOCK CHECK descriptions.&lt;BR /&gt;The easiest way i thought to do this would be to load in a CSV.&lt;/P&gt;&lt;P&gt;Question 1: Is this the easiest way?&lt;BR /&gt;Question 2: Can i use something like a WILDCARD function in the CSV?&lt;/P&gt;&lt;P&gt;What i was thinking is i could list all of my abreviations in a CSV with a wildcard next to it:&lt;BR /&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2972_sourceID:2972" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this make sense? is it possible?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:54:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291817#M1202764</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-11-30T15:54:53Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291818#M1202765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how about something like:&lt;/P&gt;&lt;P&gt;Load ..&lt;/P&gt;&lt;P&gt;REASONDESCRIPTION,&lt;/P&gt;&lt;P&gt;left(REASONDESCRIPTION, len(REASONDESCRIPTION)-18) as LISTBOX&lt;/P&gt;&lt;P&gt;which assuming the last 18 chars in REASONDESCRIPTION are always the date/time will return all characters before that into a field LISTBOX which you can use for selections.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:13:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291818#M1202765</guid>
      <dc:creator />
      <dc:date>2010-11-30T16:13:26Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291819#M1202766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Gordon,&lt;/P&gt;&lt;P&gt;Although that won't really work, as some of the descriptions have date &amp;amp; time, Some have just date, some have user &amp;amp; date &amp;amp; time, etc&lt;/P&gt;&lt;P&gt;which is why i thought about using a wildcard function for the first few letters. I know i can do this in QLIKVIEW, but i have been told that using too many IF functions in the script will seriously effect the performance of the server...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291819#M1202766</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-11-30T16:19:52Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291820#M1202767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you use a wildcard in an inline table instead of in a csv and if statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291820#M1202767</guid>
      <dc:creator>charlotte_qvw</dc:creator>
      <dc:date>2010-11-30T16:41:42Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291821#M1202768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Charlotte,&lt;/P&gt;&lt;P&gt;I have used IF statemenst now in the script which seems to work as i wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me if 33 IF statements in the script will effect the load performance much?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291821#M1202768</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-11-30T16:58:33Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291822#M1202769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It all depends on how much data you have but I would think the answer must be yes either way. Its always a question of whether the performance is acceptable or not...&lt;/P&gt;&lt;P&gt;One way that has occured to me is using wildmatch; try the following code:&lt;/P&gt;&lt;P&gt;Mappings:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Dummy, MapTo&lt;BR /&gt; 1, Stock*&lt;BR /&gt; 1, Order*&lt;BR /&gt; 1, Price override*&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;[tMap String]:&lt;BR /&gt;LOAD concat(chr(39) &amp;amp; MapTo &amp;amp; chr(39), ',') as WildQuoted,&lt;BR /&gt; concat(MapTo, ',') as WildUnquoted&lt;BR /&gt;RESIDENT Mappings&lt;BR /&gt;GROUP BY Dummy;&lt;/P&gt;&lt;P&gt;LET vWildQuoted = peek('WildQuoted', 0);&lt;BR /&gt;LET vWildUnquoted = peek('WildUnquoted', 0);&lt;/P&gt;&lt;P&gt;DROP TABLE [tMap String];&lt;/P&gt;&lt;P&gt;[tData]:&lt;BR /&gt;// This is your incoming data&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; InData&lt;BR /&gt; Stock data&lt;BR /&gt; Stock Ordering 30/11/10&lt;BR /&gt; Stock Orders Gordon&lt;BR /&gt; Price override today&lt;BR /&gt; Orders 30/11/2010 09:11:00&lt;BR /&gt; Price override&lt;BR /&gt; Something odd&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;[Data]:&lt;BR /&gt;Load InData,&lt;BR /&gt; if (MapMatch = 0, InData, pick(MapMatch, $(vWildQuoted))) as MapTo;&lt;BR /&gt;LOAD InData,&lt;BR /&gt; wildmatch(InData, $(vWildQuoted)) as MapMatch&lt;BR /&gt;RESIDENT tData;&lt;/P&gt;&lt;P&gt;DROP TABLE tData;&lt;/P&gt;&lt;P&gt;I would expect it to be faster with lots of rows, but if nothing else may make maintenance easier as you could put the inline 'Mappings' table into a spreadsheet.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 18:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291822#M1202769</guid>
      <dc:creator />
      <dc:date>2010-11-30T18:45:47Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291823#M1202770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;...you can get rid of the references to WildUnquoted which are spurious (was just playing with different ideas)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 18:49:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291823#M1202770</guid>
      <dc:creator />
      <dc:date>2010-11-30T18:49:29Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291824#M1202771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gordon,&lt;/P&gt;&lt;P&gt;Thanks for your reply, I'm not completely understanding the code though. If i post a sample of my script, could you possibly use my fields?&lt;/P&gt;&lt;P&gt;or maybe just explain what is what?&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 16:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291824#M1202771</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-12-02T16:28:24Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291825#M1202772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just copy and paste the code into a new test document and reload it. Add table objects and list boxes and you should be able to see what it does quite easily.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 17:11:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291825#M1202772</guid>
      <dc:creator />
      <dc:date>2010-12-02T17:11:08Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291826#M1202773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gordon,&lt;/P&gt;&lt;P&gt;I can see how it works now, although i'm a bit lost...&lt;/P&gt;&lt;P&gt;My data is in a table called 'StoreStockMovement' and a field named narrative.&lt;/P&gt;&lt;P&gt;How would i change the script to match my table and field?&lt;/P&gt;&lt;P&gt;[Data]:&lt;BR /&gt;Load InData,&lt;BR /&gt; if (MapMatch = 0, InData, pick(MapMatch, $(vWildQuoted))) as MapTo;&lt;BR /&gt;LOAD InData,&lt;BR /&gt; wildmatch(InData, $(vWildQuoted)) as MapMatch&lt;BR /&gt;RESIDENT tData;&lt;/P&gt;&lt;P&gt;DROP TABLE tData;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 17:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291826#M1202773</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-12-02T17:31:30Z</dc:date>
    </item>
    <item>
      <title>Loading in CSV</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291827#M1202774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 'Mappings' table reflects the strings you want to match with the wildcard '*'. For example, 'Stock*' is used to map anything beginning with 'Stock' to the 'MapTo' field value of 'Stock*'. This table you could maintain as an xls/csv etc. The filed 'Dummy' doesnt need to be in the external source but is used just to be able to use a 'Group By' in the temporary table 'tMap String'.&lt;BR /&gt;The 'LET vWildQuoted = ...' fetches the first (and only) value (into variable vWildQuoted) of the field 'WildQuoted' from table 'tMap String' and so contains all the values of 'MapTo' in a string with each one between single quotes and seperated by a ',' (ie 'Stock*','Order*','Price override')&lt;BR /&gt;Tables 'tData' and 'Data' represents your table 'StoreStockMovement' where the field 'InData' represents your field 'narrative'.&lt;BR /&gt;The 'wildmatch(...' looks for a wildcard match of 'InData' with the string in vWildQuoted and if so returns a number as to its matching position in the string as the field 'MapMatch'. 'MapMatch' will be 0 if there was no match and so the preceding load uses 'if (MapMatch = 0...)' to use the full text else returns the wildcard string it matched on as the 'key field' back to table 'Mappings'.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 18:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-in-CSV/m-p/291827#M1202774</guid>
      <dc:creator />
      <dc:date>2010-12-02T18:21:42Z</dc:date>
    </item>
  </channel>
</rss>

