emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mike Gauland <mikelygee@no8wireless.co.nz>
To: emacs-orgmode@gnu.org
Subject: Re: Org-mode as a metalanguage: calling SQL "functions"
Date: Mon, 1 Apr 2013 20:41:01 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130401T223733-920@post.gmane.org> (raw)
In-Reply-To: CAFChFyhX2TKTt0vAc8vSyFXabAgUaBM0Muru4hZEtYGQrm2SHg@mail.gmail.com

Gary Oberbrunner <garyo <at> oberbrunner.com> writes:
> Is this supposed to work?
> -- Gary

I'm not sure how it's /supposed/ to work, either, but this example works for a
sqlite database I've been playing with:

  #+NAME: artist
  #+BEGIN_SRC sqlite :db the_sound_A-Z.sql :var song_title=""
  select artist from playlist where title=="$song_title";
  #+END_SRC

  #+CALL: artist(song_title="Pressure")

  #+RESULTS: artist(song_title="Pressure")
  : Billy Joel

Note the need for double quotes around $song_title in the SRC block.

I'm using the latest from git, and emacs 23.2.1 on Debian.

Hope that helps.

Kind Regards,
Mike Gauland

  reply	other threads:[~2013-04-01 20:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 19:28 Org-mode as a metalanguage: calling SQL "functions" Gary Oberbrunner
2013-04-01 20:41 ` Mike Gauland [this message]
2013-04-02  1:19 ` Eric Abrahamsen
2013-04-02  1:45   ` Eric Schulte
2013-04-02  2:46     ` Eric Abrahamsen
2013-04-02  2:54     ` Gary Oberbrunner
2013-04-02 21:54       ` Eric Schulte
2013-04-03  5:50         ` Andreas Röhler
2013-04-03  5:54         ` Carsten Dominik
2013-04-03 13:09           ` Eric Schulte
2013-04-04 12:26             ` Sebastien Vauban
2013-04-04 12:49               ` Eric Schulte
2013-04-04 20:10                 ` Sebastien Vauban
2013-04-05 15:43                   ` Gary Oberbrunner
2013-04-05 16:31                     ` Eric Schulte
2013-04-05 17:51                       ` Andreas Röhler
2013-04-06 20:44                       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130401T223733-920@post.gmane.org \
    --to=mikelygee@no8wireless.co.nz \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).