Re: SQL PLUS Spooling with Quotes around field

From: Fraser Boswell <Fraser.Boswell_at_spamme.ed.ac.uk>
Date: Fri, 18 Jun 1999 09:17:19 +0100
Message-ID: <376A008F.2B32A551_at_spamme.ed.ac.uk>


[Quoted] I'm running Word 97 but I am getting 1 from 0001 when merging. Must be due to a difference in the ODBC drivers.
However I did the select ''''||fieldname||'''', ...from table and it worked fine. So Thanks

Fraser

Chris Weiss wrote:

> Word 97 does not display this behavior. 0001 without quotation marks was
> merged as 0001. If you have an older version of Word, this might be a
> problem.
>
> Check your spool program.
>
> If you need quotations marks you can use two single quotation marks to
> indicate a single.
>
> For example,
>
> select '''But''' from dual;
>
> If you need double quotation marks, try something like:
>
> select '"'||'two'||'"' from dual; <- This has double quotation marks.
>
> You could do things like
>
> select ''''||fielda||'''' from your table.
>
> Christopher Weiss
> Professional Services Division
> Compuware Corporation
>
> Fraser Boswell <Fraser.Boswell_at_spamme.ed.ac.uk> wrote in message
> news:37690B73.B6380D7C_at_spamme.ed.ac.uk...
> > We're currently running scripts which produce mail merge files, but Word
> > is reading a Text field which is numeric as a Number field. We know this
> > as 000001 is being merged as 1, which isn't what we want. So How can I
> > make sure that Quote marks surround each field in the spooled file?
> > Any ideas?
> >
> > Thanks in advance
> >
> > Fraser
> >
Received on Fri Jun 18 1999 - 10:17:19 CEST

Original text of this message