From: "Eric Schulte" <schulte.eric@gmail.com>
To: Joost Helberg <joost@snow.nl>
Cc: emacs-orgmode@gnu.org
Subject: Re: ob-sql error because of not specifying column-seperator
Date: Fri, 03 Dec 2010 06:59:38 -0700 [thread overview]
Message-ID: <87oc932adx.fsf@gmail.com> (raw)
In-Reply-To: 20101203.140155.105952638.joost@snow.nl
Applied, Thanks for the patch -- Eric
Joost Helberg <joost@snow.nl> writes:
> Hi,
>
> when using babel SQL, the column's in the resultset are converted to
> org-tables using (org-table-import file sep).
>
> The command used to retrieve the information from the databaseserver
> gets the option to use the tab (\t) as columnseperator.
>
> The call to org-table-import however doesn't specify this
> seperator. This leaves it to org-table-import to find out what the
> seperator is. org-table-import doesn't always succeed in this. Hence
> the diff below which sets the seperator to <tab> (\t).
>
> regards,
>
> Joost Helberg
>
> diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
> index 19c271d..6bb9a96 100644
> --- a/lisp/ob-sql.el
> +++ b/lisp/ob-sql.el
> @@ -80,7 +80,7 @@ This function is called by `org-babel-execute-src-block'."
> (message command)
> (shell-command command)
> (with-temp-buffer
> - (org-table-import out-file nil)
> + (org-table-import out-file '(16))
> (org-babel-reassemble-table
> (org-table-to-lisp)
> (org-babel-pick-name (cdr (assoc :colname-names params))
next prev parent reply other threads:[~2010-12-03 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 13:01 ob-sql error because of not specifying column-seperator Joost Helberg
2010-12-03 13:59 ` Eric Schulte [this message]
2010-12-03 14:49 ` Sébastien Vauban
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oc932adx.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=joost@snow.nl \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.