From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: sqlite im-/export Date: Fri, 17 May 2013 07:54:53 -0600 Message-ID: <87txm1k8ya.fsf@gmail.com> References: <87r4h6dfa9.fsf@kerstf.org> <87zjvuloz3.fsf@gmail.com> <87ip2id75m.fsf@kerstf.org> <87sj1mlkgd.fsf@gmail.com> <87a9nucgqf.fsf@kerstf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdL7x-0002Qi-97 for emacs-orgmode@gnu.org; Fri, 17 May 2013 09:55:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdL7r-0008Jb-Nk for emacs-orgmode@gnu.org; Fri, 17 May 2013 09:55:21 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:47066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdL7r-0008JQ-GY for emacs-orgmode@gnu.org; Fri, 17 May 2013 09:55:15 -0400 Received: by mail-pa0-f49.google.com with SMTP id bi5so3533066pad.8 for ; Fri, 17 May 2013 06:55:14 -0700 (PDT) In-Reply-To: <87a9nucgqf.fsf@kerstf.org> ("Oliver =?utf-8?B?VmXEjWVybsOt?= =?utf-8?B?ayIncw==?= message of "Fri, 17 May 2013 07:34:00 +0200") 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Oliver Ve=C4=8Dern=C3=ADk writes: >> 2. use ":results drawer", and explicitly formatting the results in >> Org-mode syntax w/awk > > Unfortunately this doesn't work. The output is always printed to the > "#+RESULTS:" section and not piped through awk. But working with > ":results raw" works perfect for me. I can even produce a separator > line in the table now with =3Dprint "|-"=3D. > > The only question left, how to import org tables "on the fly" to sqlite, > to keep everthing in Org mode. This would also be an interesting > candidate for an "ob-doc-sh.org" starter I guess. I may have missed you spelling this out in a previous email, but can you not import Org tables directly into sqlite code blocks? --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=example.org Evaluate this again after evaluating the second block. #+BEGIN_SRC sqlite :csv :db test.sqlite SELECT * from t1; #+END_SRC #+RESULTS: | 1 | apple pie | | 2 | sugar | A manually created Org-mode block. #+name: manual | 3 | rhubarb | | 4 | butter | #+BEGIN_SRC sqlite :csv :var data=manual :db test.sqlite :results silent .separator "," .import $data t1 #+END_SRC --=-=-= Content-Type: text/plain -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--