<?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: Re: Load field names beginning with .... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/2130048#M1224724</link>
    <description>&lt;P&gt;Thank Rob.&lt;/P&gt;
&lt;P&gt;Been struggling with this problem for a while now, and the answer was to take away rather than add. Simple when you come at the problem from a different direction!&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2023 14:58:42 GMT</pubDate>
    <dc:creator>smarties</dc:creator>
    <dc:date>2023-10-19T14:58:42Z</dc:date>
    <item>
      <title>Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652431#M1079542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking to load fields from a table that begin with a string (ex) all fields beginning with TEST_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would this look in the load script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 14:52:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652431#M1079542</guid>
      <dc:creator />
      <dc:date>2014-07-10T14:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652432#M1079544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if you could easily load just those fields, but if you're OK with loading the entire table and then dropping irrelevant fields, you should be able to use the technique detailed &lt;A href="http://www.qliktips.com/2009/10/removing-fields-with-wildcard.html"&gt;here&lt;/A&gt; .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 14:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652432#M1079544</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2014-07-10T14:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652433#M1079546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the table you are loading from an SQL Table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:02:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652433#M1079546</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-07-10T15:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652434#M1079548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will either be from a RESIDENT table or a qvd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:05:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652434#M1079548</guid>
      <dc:creator />
      <dc:date>2014-07-10T15:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652435#M1079549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use WildMatch, here's a simple scenerio:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P&gt;load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; fields,&lt;/P&gt;&lt;P&gt;&amp;nbsp; test_one&lt;/P&gt;&lt;P&gt;&amp;nbsp; test_two&lt;/P&gt;&lt;P&gt;&amp;nbsp; three&lt;/P&gt;&lt;P&gt;&amp;nbsp; four&lt;/P&gt;&lt;P&gt;&amp;nbsp; test_five&lt;/P&gt;&lt;P&gt;&amp;nbsp; sixe&lt;/P&gt;&lt;P&gt;&amp;nbsp; test_seven&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load if(WildMatch(fields, 'test_*'), fields) as myfield&lt;/P&gt;&lt;P&gt;Resident tmp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only fields with "test_" will load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652435#M1079549</guid>
      <dc:creator />
      <dc:date>2014-07-10T15:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652436#M1079550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lior,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. The above script matches cells within the field whereas I'm looking to load all fields that begin with a certain string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example to make it clearer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD TEST, TEST1, TEST2, TEST3, ID, SALES&lt;/P&gt;&lt;P&gt;RESIDENT JOHN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do in the above load statement is only load fields beginning with TEST (ie) &lt;BR /&gt;TEST, TEST1, TEST2, TEST3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652436#M1079550</guid>
      <dc:creator />
      <dc:date>2014-07-10T15:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652437#M1079551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nope. The expression that Lior provided is correct.&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;load if(WildMatch(fields, 'test_*'), fields) as myfield&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident tmp;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You will see that he uses * behind test_ which means that you will only load fields starting with test_. If you did the following '*test_*' it would actualy load everything that contains the word test_ inside it.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Marius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:49:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652437#M1079551</guid>
      <dc:creator />
      <dc:date>2014-07-10T15:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652438#M1079552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two approaches I can think of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Load all fields and then drop the ones you don't want.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mytab:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD * FROM ....;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR i = NoOfFields('mytab') to 1 STEP -1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; LET vFieldName = FieldName($(i),'mytab');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF NOT '$(vFieldName)' LIKE 'TEST*' THEN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP FIELD [$(vFieldName)];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ENDIF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NEXT i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that you have to work the fieldlist backwards because DROP will change the existing field indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;. Build a list of fields to load from a resident table or QVD.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SET vList=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SET vComma=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR i = 1 to NoOfFields('mytab')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; LET vFieldName = FieldName($(i),'mytab');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF '$(vFieldName)' LIKE 'TEST*' THEN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vList = '$(vList)' &amp;amp; '$(vComma)' &amp;amp; '[$(vFieldName)]';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET vComma=',';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ENDIF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NEXT i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;tab2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD $(vList)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT mytab&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note it's the same pattern for QVDs. Just sustitute in QVD functions QvdNoOfFields() and QvdFieldName().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 16:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652438#M1079552</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-07-10T16:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652439#M1079554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent stuff Rob, that's exactly what I was after!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Marius and Lior for your help also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 16:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652439#M1079554</guid>
      <dc:creator />
      <dc:date>2014-07-10T16:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652440#M1079556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very nice Rob! I started looking into similar option for dropping fields, but ran into the problem of field index changing after dropping fields because I was incrementing instead of decrementing...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 17:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/652440#M1079556</guid>
      <dc:creator />
      <dc:date>2014-07-10T17:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Load field names beginning with ....</title>
      <link>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/2130048#M1224724</link>
      <description>&lt;P&gt;Thank Rob.&lt;/P&gt;
&lt;P&gt;Been struggling with this problem for a while now, and the answer was to take away rather than add. Simple when you come at the problem from a different direction!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 14:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-field-names-beginning-with/m-p/2130048#M1224724</guid>
      <dc:creator>smarties</dc:creator>
      <dc:date>2023-10-19T14:58:42Z</dc:date>
    </item>
  </channel>
</rss>

