From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: sqlite im-/export Date: Thu, 16 May 2013 13:11:12 -0600 Message-ID: <87zjvuloz3.fsf@gmail.com> References: <87r4h6dfa9.fsf@kerstf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud3aR-0001D0-ER for emacs-orgmode@gnu.org; Thu, 16 May 2013 15:11:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ud3aQ-0004Ab-DI for emacs-orgmode@gnu.org; Thu, 16 May 2013 15:11:35 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud3aQ-0004AR-7d for emacs-orgmode@gnu.org; Thu, 16 May 2013 15:11:34 -0400 Received: by mail-pa0-f54.google.com with SMTP id kx1so2808030pab.27 for ; Thu, 16 May 2013 12:11:33 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Oliver =?utf-8?B?VmXEjWVybsOtaw==?= Cc: emacs-orgmode@gnu.org Oliver Ve=C4=8Dern=C3=ADk writes: > Hi, > > I've got a small test case which I believe is a bug: > > $ cat t1.sql > PRAGMA foreign_keys=3DOFF; > BEGIN TRANSACTION; > CREATE TABLE t1(id integer,product text); > INSERT INTO "t1" VALUES(1,'apple pie'); > INSERT INTO "t1" VALUES(2,'sugar'); > COMMIT; > sqlite3 test.sqlite < t1.sql > > #+BEGIN_SRC sh > echo "ID|product" > sqlite3 test.sqlite " > SELECT * from t1; > " > #+END_SRC > > #+RESULTS: > | ID | product | | > | 1 | apple | pie | > | 2 | sugar | | > What about #+BEGIN_SRC sqlite :csv :db test.sqlite SELECT * from t1; #+END_SRC #+RESULTS: | 1 | apple pie | | 2 | sugar | --=20 Eric Schulte http://cs.unm.edu/~eschulte