From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: A strange problem with org-babel and SQLite Date: Fri, 31 Aug 2018 11:17:25 +0200 Message-ID: <20180831111725.3aeba880@lt70.mpip-mainz.mpg.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvfhf-0001h7-IG for emacs-orgmode@gnu.org; Fri, 31 Aug 2018 05:26:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvfYb-0004Ll-35 for emacs-orgmode@gnu.org; Fri, 31 Aug 2018 05:17:36 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:47499) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fvfYa-0004Le-Pm for emacs-orgmode@gnu.org; Fri, 31 Aug 2018 05:17:33 -0400 Received: from lt70.mpip-mainz.mpg.de ([194.95.63.248]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MNiNa-1fyRVo3rYY-007GMD for ; Fri, 31 Aug 2018 11:17:30 +0200 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi Cecil, On Fri, 31 Aug 2018 10:47:50 +0200 Cecil Westerhof wrote: > I have a strange problem with org-babel and SQLite. >=20 > I have a database that is created with: > CREATE TABLE "quotes" ( > quoteID TEXT PRIMARY KEY, > quote TEXT NOT NULL UNIQUE, > lastUsed TEXT, > totalUsed INT DEFAULT 'unused' > ) >=20 > When using: > #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames yes > SELECT lastUsed > , totalUsed > FROM quotes > ORDER BY lastused ASC > , totalUsed DESC > LIMIT 40 > #+END_SRC >=20 > Everything is fine. But when I use (add the quote field in the > select): #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames yes > SELECT quote > , lastUsed > , totalUsed > FROM quotes > ORDER BY lastused ASC > , totalUsed DESC > LIMIT 40 > #+END_SRC >=20 > I get: > executing Sqlite code block... > Wrote /tmp/babel-27920y_/ob-input-2792BTG > org-babel-read: End of file during parsing >=20 > What could be the problem? >=20 does it work outside of org/babel/emacs, that is, when you use the query in a command line sqlite session, does it work? =E2=80=9Cquote=E2=80= =9D is also a function in sqlite, so this might be your issue. Best regards Robert