<?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 SQL WHERE LIKE query - in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264933#M1204816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John, sorry if the question was unclear - I hope to clarify below:-&lt;/P&gt;&lt;P&gt;In my Access Database I have a table tbCustomers within the table I have a column for custords - the data in the custords column reflewct both sales and credits sales are prefixed with SO ( Sales Order ) and Credits with CR. The format of each is SO12345 CR12345 each is a unique number.&lt;/P&gt;&lt;P&gt;I have created some impressive dashboard tabs- but a query is to product queries to list only Credits - without showing Sales Orders and Vice a Versa&lt;/P&gt;&lt;P&gt;This is why I thought upon using the Select Where Like Statement - In reality I am looking to undertake 2 selections from the same data source renaming each as select where queries one for CR loaded as Credits and the Other SO as Sales. As such I am looking to perform the select where statement as part of the load in order to define the result as Credits or sales.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jul 2010 11:24:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-12T11:24:10Z</dc:date>
    <item>
      <title>SQL WHERE LIKE query -</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264931#M1204814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have in one table tblcustomers a field custords. in this field i have both sales orders and credits posted. Each prefixed with SO for sales order and CR for credits. I have attempt to run a query to list only credits and or only sales orders. script is pretty standard&lt;/P&gt;&lt;P&gt;select * from tblcustomers where custords like 'CR%';&lt;/P&gt;&lt;P&gt;ideally i would ike to define the return as credits in the above example.&lt;/P&gt;&lt;P&gt;I apologise if this has been answered elsewhere.&lt;/P&gt;&lt;P&gt;any pointers will be gratefully received.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 16:50:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264931#M1204814</guid>
      <dc:creator />
      <dc:date>2010-07-09T16:50:49Z</dc:date>
    </item>
    <item>
      <title>SQL WHERE LIKE query -</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264932#M1204815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this what you're asking for? I'm not sure I understand the question.&lt;/P&gt;&lt;P&gt;load *,mid(custords,3) as credits;&lt;BR /&gt;select * from tblcustomers where custords like 'CR%';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jul 2010 01:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264932#M1204815</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-10T01:12:46Z</dc:date>
    </item>
    <item>
      <title>SQL WHERE LIKE query -</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264933#M1204816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John, sorry if the question was unclear - I hope to clarify below:-&lt;/P&gt;&lt;P&gt;In my Access Database I have a table tbCustomers within the table I have a column for custords - the data in the custords column reflewct both sales and credits sales are prefixed with SO ( Sales Order ) and Credits with CR. The format of each is SO12345 CR12345 each is a unique number.&lt;/P&gt;&lt;P&gt;I have created some impressive dashboard tabs- but a query is to product queries to list only Credits - without showing Sales Orders and Vice a Versa&lt;/P&gt;&lt;P&gt;This is why I thought upon using the Select Where Like Statement - In reality I am looking to undertake 2 selections from the same data source renaming each as select where queries one for CR loaded as Credits and the Other SO as Sales. As such I am looking to perform the select where statement as part of the load in order to define the result as Credits or sales.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 11:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264933#M1204816</guid>
      <dc:creator />
      <dc:date>2010-07-12T11:24:10Z</dc:date>
    </item>
    <item>
      <title>SQL WHERE LIKE query -</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264934#M1204817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like this, then:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Table]:&lt;BR /&gt;load *,mid(custords,3) as credits;&lt;BR /&gt;select * from tblcustomers where custords like 'CR%';&lt;BR /&gt;concatenate ([Table])&lt;BR /&gt;load *,mid(custords,3) as salesorders;&lt;BR /&gt;select * from tblcustomers where custords like 'SO%';&lt;/P&gt;&lt;P&gt;This might be a more efficient approach, but you'd have to test:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Table]:&lt;BR /&gt;LOAD *&lt;BR /&gt;,recno() as ID&lt;BR /&gt;,left(custords,2) as type&lt;BR /&gt;;&lt;BR /&gt;SELECT * FROM tblcustomers&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN ([Table])&lt;BR /&gt;LOAD&lt;BR /&gt; ID&lt;BR /&gt;,mid(custords,3) as credits&lt;BR /&gt;RESIDENT [Table]&lt;BR /&gt;WHERE type = 'CR'&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN ([Table])&lt;BR /&gt;LOAD&lt;BR /&gt; ID&lt;BR /&gt;,mid(custords,3) as salesorders&lt;BR /&gt;RESIDENT &lt;TABLE&gt;&lt;BR /&gt;WHERE type = 'SO'&lt;BR /&gt;;&lt;P&gt;&lt;/P&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 20:32:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264934#M1204817</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-12T20:32:41Z</dc:date>
    </item>
    <item>
      <title>SQL WHERE LIKE query -</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264935#M1204818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;P&gt;Thank you John that has answered the query. I used the second script option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you save me a great headache&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 15:42:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-WHERE-LIKE-query/m-p/264935#M1204818</guid>
      <dc:creator />
      <dc:date>2010-07-13T15:42:11Z</dc:date>
    </item>
  </channel>
</rss>

