<?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 Overwrite a field with a calculated filed within the same script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375008#M803242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, This works but i'm looking to condense it to one Load if possible to reduce script run time and memory/CPU usage usage - tables are millions of rows in size.&amp;nbsp;&amp;nbsp;&amp;nbsp; I need to clean out everything in the Agent field past the ":", but the field name must remain as Agent in the final data.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATASET_2:&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;,left(Agent,index(Agent,':')-1) as Agent2&lt;/P&gt;&lt;P&gt;Resident DATASET;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP table DATASET;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Drop field Agent;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATASET_3:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;,Agent2 as Agent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;,*&lt;/P&gt;&lt;P&gt;Resident DATASET_2;&lt;/P&gt;&lt;P&gt;DROP table DATASET_2;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Overwrite a field with a calculated filed within the same script</title>
      <link>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375008#M803242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, This works but i'm looking to condense it to one Load if possible to reduce script run time and memory/CPU usage usage - tables are millions of rows in size.&amp;nbsp;&amp;nbsp;&amp;nbsp; I need to clean out everything in the Agent field past the ":", but the field name must remain as Agent in the final data.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATASET_2:&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;,left(Agent,index(Agent,':')-1) as Agent2&lt;/P&gt;&lt;P&gt;Resident DATASET;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP table DATASET;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Drop field Agent;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATASET_3:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;,Agent2 as Agent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;,*&lt;/P&gt;&lt;P&gt;Resident DATASET_2;&lt;/P&gt;&lt;P&gt;DROP table DATASET_2;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375008#M803242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite a field with a calculated filed within the same script</title>
      <link>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375009#M803243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the below code in your first load itself like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DATASET:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LOAD left(Agent,index(Agent,':')-1) as Agent FROM ......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You can eliminate all the other steps Dateset2,dataset3, Resident, Drop field etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Varun&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 05:18:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375009#M803243</guid>
      <dc:creator>techvarun</dc:creator>
      <dc:date>2017-11-13T05:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite a field with a calculated filed within the same script</title>
      <link>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375010#M803244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't do like this? This makes better where you expected &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATASET:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load @1, @2, Agent, left(Agent,index(Agent,':')-1) as Agent2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATASET:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load @1, @2, Agent, left(Agent,index(Agent,':')-1) as Agent2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Drop Field Agent From DATASET;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RENAME Field Agent2 to Agent;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 05:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375010#M803244</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-11-13T05:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite a field with a calculated filed within the same script</title>
      <link>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375011#M803245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or You can try&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;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;DATASET:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;LOAD SubField(Agent,':',1) as Agent FROM ......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 05:23:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375011#M803245</guid>
      <dc:creator>techvarun</dc:creator>
      <dc:date>2017-11-13T05:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite a field with a calculated filed within the same script</title>
      <link>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375012#M803246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks both, Rename Field was the trick I was looking for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Varun, I couldn't do it that way because I was also loading all fields "*" so it was causing a column name conflict error.&amp;nbsp; I'll try the subfield formula though, thanks for that. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 05:44:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overwrite-a-field-with-a-calculated-filed-within-the-same-script/m-p/1375012#M803246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-13T05:44:17Z</dc:date>
    </item>
  </channel>
</rss>

