From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] Verbatim output from SQL command Date: Tue, 18 Oct 2011 10:15:33 -0600 Message-ID: <87k4822s4a.fsf@gmail.com> References: <80mxcymo6a.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGCKI-0005gd-D3 for emacs-orgmode@gnu.org; Tue, 18 Oct 2011 12:15:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGCKG-0002T3-Hj for emacs-orgmode@gnu.org; Tue, 18 Oct 2011 12:15:38 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:50172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGCKG-0002Sl-2E for emacs-orgmode@gnu.org; Tue, 18 Oct 2011 12:15:36 -0400 Received: by ggnh4 with SMTP id h4so803383ggn.0 for ; Tue, 18 Oct 2011 09:15:35 -0700 (PDT) In-Reply-To: <80mxcymo6a.fsf@somewhere.org> (Sebastien Vauban's message of "Tue, 18 Oct 2011 15:20:29 +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: Sebastien Vauban Cc: emacs-orgmode@gnu.org Hi Seb, I've just pushed up a fix which should resolve this issue. Best -- Eric "Sebastien Vauban" writes: > #+BABEL: :engine msosql :cmdline -S -U -P -d -n -w 700 > > * Show code of stored procedure > > Despite telling Babel that I'd like to see the output as it is, it displays it > in a 4-column table. > > See http://i.imgur.com/neDO3.png for the original layout in SQL Query Analyser > (1 column, 34 lines). > > Babel seems to interpret every *leading space* as *one empty column*. Normal, > feature, bug? > > Is there some workaround to this? I thought stating "scalar" would really > completely override any interpretation... > > ** Code > > This is an example of code run against a Microsoft SQL server. > > #+begin_src sql :eval yes :results output scalar > EXEC sp_helptext 'dt_setpropertybyid' > #+end_src > > #+results: > | Text | | | | > |-----------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------------------------| > | /* | | | | > | | | | | > | ** | If the property already exists, reset the value; otherwise add property | | | > | | | | | > | ** | | id -- the id in sysobjects of the object | | > | | | | | > | ** | | property -- the name of the property | | > | | | | | > | ** | | value -- the text value of the property | | > | | | | | > | ** | | lvalue -- the binary value of the property (image) | | > | | | | | > | */ | | | | > | | | | | > | create procedure dbo.dt_setpropertybyid | | | | > | | | | | > | | @id int, | | | > | | | | | > | | @property varchar(64), | | | > | | | | | > | | @value varchar(255), | | | > | | | | | > | | @lvalue image | | | > | | | | | > | as | | | | > | | | | | > | | set nocount on | | | > | | | | | > | | declare @uvalue nvarchar(255) | | | > | | | | | > | | set @uvalue = convert(nvarchar(255), @value) | | | > | | | | | > | | if exists (select * from dbo.dtproperties | | | > | | | | | > | | | | where objectid=@id and property=@property) | > | | | | | > | | begin | | | > | | | | | > | | | -- | | > | | | | | > | | | -- bump the version count for this row as we update it | | > | | | | | > | | | -- | | > | | | | | > | | | update dbo.dtproperties set value=@value, uvalue=@uvalue, lvalue=@lvalue, version=version+1 | | > | | | | | > | | | | where objectid=@id and property=@property | > | | | | | > | | end | | | > | | | | | > | | else | | | > ... > > Best regards, > Seb -- Eric Schulte http://cs.unm.edu/~eschulte/