<?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 Verifying the result of a SELECT using VBScript in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Verifying-the-result-of-a-SELECT-using-VBScript/m-p/323503#M1196302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Check if its len is greater than zero. Something like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if len(trim(sSQL.Fields(0).Value)) &amp;gt;0 then&lt;/P&gt;&lt;P&gt;store value&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;exit script.&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Apr 2011 07:39:53 GMT</pubDate>
    <dc:creator>deepakk</dc:creator>
    <dc:date>2011-04-24T07:39:53Z</dc:date>
    <item>
      <title>Verifying the result of a SELECT using VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Verifying-the-result-of-a-SELECT-using-VBScript/m-p/323502#M1196301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm creating a VBScript sub to read from a SQL Server table. The select reads records filtering from a particular primary key value passed by a QV variable.&lt;/P&gt;&lt;P&gt;I have sSQL = "SELECT TOP 1 Code FROM myTable where code = '" &amp;amp; varCodeValue &amp;amp; "'".&lt;/P&gt;&lt;P&gt;When it exists a record for code value I can control the select result with sSQL.Fields(0).Value, but when no records are found I have an error.&lt;/P&gt;&lt;P&gt;How can I verify when my select returns no records? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Apr 2011 22:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Verifying-the-result-of-a-SELECT-using-VBScript/m-p/323502#M1196301</guid>
      <dc:creator />
      <dc:date>2011-04-23T22:56:52Z</dc:date>
    </item>
    <item>
      <title>Verifying the result of a SELECT using VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Verifying-the-result-of-a-SELECT-using-VBScript/m-p/323503#M1196302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Check if its len is greater than zero. Something like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if len(trim(sSQL.Fields(0).Value)) &amp;gt;0 then&lt;/P&gt;&lt;P&gt;store value&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;exit script.&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Apr 2011 07:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Verifying-the-result-of-a-SELECT-using-VBScript/m-p/323503#M1196302</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2011-04-24T07:39:53Z</dc:date>
    </item>
  </channel>
</rss>

