From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Patch for ob-sql.el SQL output Date: Tue, 21 Dec 2010 16:34:38 +0100 Message-ID: <80hbe7gmwh.fsf@missioncriticalit.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Charles, Charles Sebold wrote: > I use org-mode and babel under Windows with osql, and the line separating > the header from the rest of the rows in the output was bothering me. Excellent initiative! > I don't know that this is a really good fix, but maybe it's a start for o= ne? > It looks for the first output line of all dashes and replaces it later wi= th > the 'hline when the table is lisp-ified. It does not work correctly for me (with the osql engine). Look at the situation before/after your patch: 1. Before #+srcname: top-10-dossiers-with-many-presta #+begin_src sql SET NOCOUNT ON SELECT TOP 10 prsAbcID, COUNT(*) AS '# Presta' FROM presta GROUP BY prsAbcID ORDER BY COUNT(*) DESC #+end_src #+results: top-10-dossiers-with-many-presta | prsAbcID | # Presta | | ---------------- | ------------- | | 73020050900111 | 22 | | 52020030200047 | 21 | | 61020060400007 | 21 | | 62020031200052 | 20 | | 72020051100016 | 20 | | 73020050800025 | 20 | | 56020031100002 | 19 | | 63020060900056 | 19 | | 61020030900049 | 18 | | 72020030700040 | 18 | | | | Another annoying thing is the empty line at the end. With the COUNT ON, there is one empty line followed by the count. 2. After #+results: top-10-dossiers-with-many-presta | prsAbcID | # Presta | | ---------------- | ------------- | | 73020050900111 | 22 | | 52020030200047 | 21 | | 61020060400007 | 21 | | 62020031200052 | 20 | | 72020051100016 | 20 | | 73020050800025 | 20 | | 56020031100002 | 19 | | 63020060900056 | 19 | | 61020030900049 | 18 | | 72020030700040 | 18 | |------------------+---------------| The hline is not applied on the second line, but at the end of the table. Perhaps the good condition is to work on the second line? Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode