<?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 Retrieve specific data from db by using &amp;quot;AND left&amp;quot; and &amp;quot;AND&amp;quot;? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Retrieve-specific-data-from-db-by-using-quot-AND-left-quot-and/m-p/81706#M789496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am quite new to QS and my script looks like this (working fine - I get all customer numbers starting with 6, except for customer 6210)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM abc.dbo."purchase_order"&lt;/P&gt;&lt;P&gt;WHERE order_date &amp;gt;= '2018-01-01'&lt;/P&gt;&lt;P&gt;AND left(order_customer_no,1) = '6'&lt;/P&gt;&lt;P&gt;AND (order_customer_no) not in ('6210')&lt;/P&gt;&lt;P&gt;AND delete_flag = '0'&lt;/P&gt;&lt;P&gt;AND order_status IN ('1','2','3','4');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to also get customer numbers not starting with 6, I want to add specific customer numbers not starting with 6, for instance customer numbers 723456 and 732123.&lt;/P&gt;&lt;P&gt;How do I do that? I get not data when doing as below (as an example) and i have tried a number of other combinations (IN, =, sort order in script etc) without success... I get no data back. This is surely a simple fix but I cant figure it out &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM abc.dbo."purchase_order"&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;WHERE order_date &amp;gt;= '2018-01-01'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND left (order_customer_no,1) = '6'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND (order_customer_no) not in ('6210')&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;AND (order_customer_no) IN ('723456','732123')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND delete_flag = '0'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND order_status IN ('1','2','3','4');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>tigra999</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Retrieve specific data from db by using "AND left" and "AND"?</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieve-specific-data-from-db-by-using-quot-AND-left-quot-and/m-p/81706#M789496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am quite new to QS and my script looks like this (working fine - I get all customer numbers starting with 6, except for customer 6210)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM abc.dbo."purchase_order"&lt;/P&gt;&lt;P&gt;WHERE order_date &amp;gt;= '2018-01-01'&lt;/P&gt;&lt;P&gt;AND left(order_customer_no,1) = '6'&lt;/P&gt;&lt;P&gt;AND (order_customer_no) not in ('6210')&lt;/P&gt;&lt;P&gt;AND delete_flag = '0'&lt;/P&gt;&lt;P&gt;AND order_status IN ('1','2','3','4');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to also get customer numbers not starting with 6, I want to add specific customer numbers not starting with 6, for instance customer numbers 723456 and 732123.&lt;/P&gt;&lt;P&gt;How do I do that? I get not data when doing as below (as an example) and i have tried a number of other combinations (IN, =, sort order in script etc) without success... I get no data back. This is surely a simple fix but I cant figure it out &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM abc.dbo."purchase_order"&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;WHERE order_date &amp;gt;= '2018-01-01'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND left (order_customer_no,1) = '6'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND (order_customer_no) not in ('6210')&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;AND (order_customer_no) IN ('723456','732123')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND delete_flag = '0'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;AND order_status IN ('1','2','3','4');&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/Retrieve-specific-data-from-db-by-using-quot-AND-left-quot-and/m-p/81706#M789496</guid>
      <dc:creator>tigra999</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve specific data from db by using "AND left" and "AND"?</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieve-specific-data-from-db-by-using-quot-AND-left-quot-and/m-p/81707#M789497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM abc.dbo."purchase_order"&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE order_date &amp;gt;= '2018-01-01'&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;AND&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;&amp;nbsp; ( left (order_customer_no,1) = '6' AND order_customer_no not in ('6210') ) &lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order_customer_no IN ('723456','732123')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;AND delete_flag = '0'&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;AND order_status IN ('1','2','3','4');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 17:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieve-specific-data-from-db-by-using-quot-AND-left-quot-and/m-p/81707#M789497</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-02-09T17:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve specific data from db by using "AND left" and "AND"?</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieve-specific-data-from-db-by-using-quot-AND-left-quot-and/m-p/81708#M789498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx! working fine &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 17:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieve-specific-data-from-db-by-using-quot-AND-left-quot-and/m-p/81708#M789498</guid>
      <dc:creator>tigra999</dc:creator>
      <dc:date>2018-02-09T17:44:33Z</dc:date>
    </item>
  </channel>
</rss>

