<?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: SQLite using Pipes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133475#M27119</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since it seems it's not SAS that is the issue, you might find answers in a different forum. The average SAS user have no experience with SQLite...;-)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 10:40:39 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2013-04-26T10:40:39Z</dc:date>
    <item>
      <title>SQLite using Pipes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133472#M27116</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 am trying to access a SQLite database using pipes as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename QUERY pipe 'sqlite3 home/data/MyDB.db3 "select field1 from table1"';&lt;BR /&gt;&amp;nbsp; options linesize = max;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data mySet;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile QUERY delimiter = '|' missover dsd lrecl = 32767;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have simplified the query, but the original runs fine from SQLite studio.&lt;/P&gt;&lt;P&gt;However when I run this, I get a single row in my data table with SQL ERROR in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone can shed any light on this I'd appreciate it.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 17:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133472#M27116</guid>
      <dc:creator>NDS</dc:creator>
      <dc:date>2013-03-13T17:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite using Pipes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133473#M27117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Run your command in a bare DOS window instead of the IDE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it runs in the DOS window, we'll need to investiage PIPE further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 14:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133473#M27117</guid>
      <dc:creator>jwsquillace</dc:creator>
      <dc:date>2013-03-14T14:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite using Pipes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133474#M27118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sorry - took some time to get back to this. I have tried what you suggested and I have a couple of issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. A simple SQL command runs fine from the prompt (i.e. Select * from MYTABLE) - and the same simple query runs fine from in SAS using pipes.&lt;/P&gt;&lt;P&gt;2. When I try to select from a view (from the prompt or SAS) I get an error that the&lt;STRONG&gt; column&lt;/STRONG&gt; name can't be found (i.e. Select * from [myView]) this squery works fine in the IDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It must be interpreting the query that defines the view correctly as it is looking for the right column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some issue selecting from views using sqlite3?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One possible issue is that the original .db3 file was created in a windows environment and I have copied it over to a unix environment. I tried dos2unix but that seemed to corrupt the file....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 09:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133474#M27118</guid>
      <dc:creator>NDS</dc:creator>
      <dc:date>2013-04-26T09:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: SQLite using Pipes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133475#M27119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since it seems it's not SAS that is the issue, you might find answers in a different forum. The average SAS user have no experience with SQLite...;-)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 10:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQLite-using-Pipes/m-p/133475#M27119</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-04-26T10:40:39Z</dc:date>
    </item>
  </channel>
</rss>

