<?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: Defining a new data to existing field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710200#M1068600</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is how I select my data, but since it's not possible to write any sql request like "where" or "group by", I don't have anything else yet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO [...];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_REFERENCE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_NOM_1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_REP_CODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_CODE_POSTAL,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_VILLE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_PAYS&lt;/P&gt;&lt;P&gt;FROM FC_REFERENCES;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2014 11:34:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-04T11:34:14Z</dc:date>
    <item>
      <title>Defining a new data to existing field</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710198#M1068598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a OLEDB database that i retrieve from my database that contains a lot of information about our customers. I would like to sort them by country, state and then postcode.&lt;/P&gt;&lt;P&gt;Since we only have the country and the postcode in the database, I had the idea to create a new field, here state automatically when retrieving the datas from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would look like this:&lt;/P&gt;&lt;P&gt;SET Liège when the postcode starts with a "4" for Belgium for example, but it should pqy qttention to the amount of numbers in the postcode.. In Belgium we have 4 numbers in the poscode, while in France it is constructed of 5 numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'm a newbe, I don't find a bunch of information and I found nothing about scipting and expressions on the web &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 11:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710198#M1068598</guid>
      <dc:creator />
      <dc:date>2014-09-04T11:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a new data to existing field</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710199#M1068599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you post some data and/or script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 11:31:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710199#M1068599</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-09-04T11:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a new data to existing field</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710200#M1068600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is how I select my data, but since it's not possible to write any sql request like "where" or "group by", I don't have anything else yet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO [...];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_REFERENCE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_NOM_1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_REP_CODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_CODE_POSTAL,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_VILLE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FO_PAYS&lt;/P&gt;&lt;P&gt;FROM FC_REFERENCES;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 11:34:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710200#M1068600</guid>
      <dc:creator />
      <dc:date>2014-09-04T11:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a new data to existing field</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710201#M1068601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;add a load before your sql select &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;qlik will execute the SQL and then the LOAD using the data from the SQL &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;in the LOAD add your logic, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;here an example&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&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; font-size: 12.7272720336914px;"&gt;&lt;EM&gt;if you posty your qlik doc (after you load some data from the db and save it) we (community) can use your data to answer &lt;/EM&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; font-size: 12.7272720336914px;"&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; font-size: 12.7272720336914px;"&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; font-size: 12.7272720336914px;"&gt;OLEDB CONNECT32 TO [...];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL)=4, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Belgium',&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'France'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) as newfield&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //calculated fiield&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FO_REFERENCE,&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FO_NOM_1,&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FO_REP_CODE,&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FO_CODE_POSTAL,&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FO_VILLE,&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FO_PAYS&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM FC_REFERENCES;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 11:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710201#M1068601</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-09-04T11:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a new data to existing field</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710202#M1068602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This could have worked but I misspoke myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it set a new field for a value with a specific number of character but since there are several postcodes with 4 numbers it doesn't help.&lt;BR /&gt;For example, all the postcodes starting with "4" (4000, 4320, 4600 etc) should have the same Province (here Liège) while other postcodes starting with "1" (1000, 1020) etc should have Bruxelles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought of using a simple interval, saying if the postcode beling between 4000 and 4999 set Liège, do you think it is possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710202#M1068602</guid>
      <dc:creator />
      <dc:date>2014-09-04T12:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a new data to existing field</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710203#M1068603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use nested if&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;if(left(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL&lt;/SPAN&gt;,4)&amp;gt;=4000 and left(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL&lt;/SPAN&gt;,4)&amp;lt;5000, '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;Liège&lt;/SPAN&gt;'&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;if(left(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;,4)&amp;gt;=5001 and left(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;,4)&amp;lt;6000, 'othercity'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;if(left(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;,4)&amp;gt;=1001 and left(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;,4)&amp;lt;2000, '&lt;SPAN style="font-size: 13.63636302948px;"&gt;Bruxelles&lt;/SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;'nocityfound')))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;or you can use pick and match/wildmatch&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;pick(wildmatch(left(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;FO_CODE_POSTAL&lt;/SPAN&gt;,1), '1', '2', '3', '4', '*'), 'city1', 'city2', 'city3', 'city4', 'othercity')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;or etc...etc....., depends on your data&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710203#M1068603</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-09-04T12:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a new data to existing field</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710204#M1068604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!!! I used the wildmatch and it works perfectly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:55:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-new-data-to-existing-field/m-p/710204#M1068604</guid>
      <dc:creator />
      <dc:date>2014-09-04T12:55:31Z</dc:date>
    </item>
  </channel>
</rss>

