<?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 Rename 'fields name' to 'include table' name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144306#M23269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;my source is an excel file...&lt;/P&gt;&lt;P&gt;how to include the table name.&lt;/P&gt;&lt;P&gt;excel file name is join.xls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;bharathe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 May 2010 13:00:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-11T13:00:53Z</dc:date>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144300#M23263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;Is there a tip to quickly rename all fields of a table as follows:&lt;/P&gt;&lt;P dir="ltr"&gt;[tablename fieldname] leading to 'Account Id' instead of 'Id' when loading the Id field from Account.&lt;/P&gt;&lt;P dir="ltr"&gt;Writing a load Id as [Account Id] statement for each fields is a lot of work...&lt;/P&gt;&lt;P dir="ltr"&gt;Thanks for your answer !&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2009 23:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144300#M23263</guid>
      <dc:creator />
      <dc:date>2009-05-15T23:17:55Z</dc:date>
    </item>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144301#M23264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will Qualify stmt work for you?&lt;/P&gt;&lt;P&gt;That is the easiest option to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2009 23:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144301#M23264</guid>
      <dc:creator />
      <dc:date>2009-05-15T23:35:46Z</dc:date>
    </item>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144302#M23265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Vidyut that qualify is the easiest option. However, if that won't work for you, remember that RENAME FIELDS can use a Map. You could build the map dynaimcally with a sub like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;SUB renameFields (table, prefix)&lt;BR /&gt; FOR i = 1 to NoOfFields('$(table)')&lt;BR /&gt; LET fld = FieldName($(i), '$(table)');&lt;BR /&gt; mapTemp:&lt;BR /&gt; LOAD '$(fld)' as RenameFrom, '$(prefix) ' &amp;amp; '$(fld)' as RenameTo&lt;BR /&gt; RESIDENT [$(table)];&lt;BR /&gt; NEXT i&lt;BR /&gt; RenameMap:&lt;BR /&gt; MAPPING LOAD * RESIDENT mapTemp;&lt;BR /&gt; DROP TABLE mapTemp;&lt;BR /&gt; RENAME FIELDS USING RenameMap;&lt;BR /&gt;END SUB&lt;BR /&gt;call renameFields('data', 'Customer') // Add "Customer " all fieldnames in table "data"&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 May 2009 05:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144302#M23265</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-05-16T05:01:57Z</dc:date>
    </item>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144303#M23266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks QUALIFY works perfect.&lt;/P&gt;&lt;P&gt;now, How do I unqualify one field to allow linking it to a field in another table whie renaming it as the same time:&lt;/P&gt;&lt;P&gt;do not really understand how QUNQUALIFY applies (old field name or renamed filed name ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2009 00:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144303#M23266</guid>
      <dc:creator />
      <dc:date>2009-05-17T00:08:32Z</dc:date>
    </item>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144304#M23267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can't, by the means of UNQUALIFY.&lt;/P&gt;&lt;P&gt;for an already loaded field you can only do a 'RENAME FIELD [FIELD1] TO [FIELD2]', &lt;STRONG&gt;only&lt;/STRONG&gt; if the [FIELD2] doesn't match (by name) another loaded field.&lt;/P&gt;&lt;P&gt;if you are in the "only" scenario, you can bypass this by making a self-join to the table containing FIELD1. suppose you have this table loaded with the "QUALIFY *":&lt;/P&gt;&lt;P&gt;QUALIFY *;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ID,FIELD1,FIELD2&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1,TEXT1,TEXT11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2,TEXT2,TEXT22&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3,TEXT1,TEXT11];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UNQUALIFY *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can do the self-join like that:&lt;/P&gt;&lt;P&gt;INNER JOIN (T1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD DISTINCT T1.FIELD2, T1.FIELD2 AS FIELD2&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RESIDENT T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is with a big self-joining table... RESIDENT works slower than an optimized-load from a .QVD file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2009 02:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144304#M23267</guid>
      <dc:creator>mongolu</dc:creator>
      <dc:date>2009-05-17T02:58:09Z</dc:date>
    </item>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144305#M23268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;jeffrobertz wrote:&lt;BR /&gt;How do I unqualify one field to allow linking it to a field in another table whie renaming it as the same time:&lt;BR /&gt;do not really understand how QUNQUALIFY applies (old field name or renamed filed name ?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you want to unqualify one or more fields to use for linking, do it like this -- before loading.&lt;/P&gt;&lt;P&gt;QUALIFY *; // Qualify all fields&lt;BR /&gt;UNQUALIFY Id; // Except for the Id field&lt;BR /&gt;LOAD ....&lt;/P&gt;&lt;P&gt;The UNQUALIFIED field can be a new name created by an "as" clause.. You will specify the renamed field. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;QUALIFY *;&lt;BR /&gt;UNQUALIFY LinkId;&lt;BR /&gt;TabA:&lt;BR /&gt;LOAD *, Id as LinkId;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Id, Customer, Amount&lt;BR /&gt;1, ABC, 200&lt;BR /&gt;];&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This will generate a table with fields named TabA.Id, TabA.Customer, TabA.Amount and LinkId.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 May 2009 06:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144305#M23268</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-05-23T06:18:48Z</dc:date>
    </item>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144306#M23269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;my source is an excel file...&lt;/P&gt;&lt;P&gt;how to include the table name.&lt;/P&gt;&lt;P&gt;excel file name is join.xls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;bharathe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 13:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144306#M23269</guid>
      <dc:creator />
      <dc:date>2010-05-11T13:00:53Z</dc:date>
    </item>
    <item>
      <title>Rename 'fields name' to 'include table' name</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144307#M23270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bharathe&lt;/P&gt;&lt;P&gt;the table name is given by the label before the load statement, not by the excel file or sheet.&lt;/P&gt;&lt;P&gt;to add the label to your fields use the QUALIFY *; before the load.&lt;/P&gt;&lt;P&gt;I prefer to make frequent use of QUALIFY, UNQUALIFY as the setting remains and reordering or adding of loads might give unwanted results.&lt;/P&gt;&lt;P&gt;The QUALIFY/UNQUALIFY statements allow also for wildcards, you could e.g. state&lt;/P&gt;&lt;P&gt;UNQUALIFY '*_ID';&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 14:07:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-fields-name-to-include-table-name/m-p/144307#M23270</guid>
      <dc:creator />
      <dc:date>2010-05-11T14:07:06Z</dc:date>
    </item>
  </channel>
</rss>

