Re: SQL Question
Date: 1999/01/11
Message-ID: <369ADCEA.7B3_at_earthlink.net>#1/1
June Tong wrote:
> Susan Elliott (ISG) wrote:
> > I have few unloads that are done reguarly, 1 of these
> > unloads is used to upload the data into an access database.
> > The Access database requires quotes (") around text fields,
> > currently this is being done manually using find and replace
> > through vi - this can be automated at the Unix level using sed,
> > but ideally, I would like the Informix unload process to do this.
> > I seem to think that there is a way of doing this - has anyone
> > any ideas ?
>
> How about coding it into your unload query?
>
> UNLOAD TO file.unl
> SELECT """" || charcol || """", intcol, datecol, """" || varcharcol || """"
> FROM tablename
This would work, though you would get trailing spaces on the end of all your CHAR columns (unless you applied the TRIM function to them), which would use more space in your unload file.
I don't think any of the standard Informix tools unload in CSV or quoted string formats.
However, if you're brave and have ESQL/C or ClientSDK on your machine, you could investigate SQLCMD in the IIUG software archive which does have such a mode.
> Grounded in Palo Alto, living on KitKat bars
The variety in June's diet is astonishing; one day M&M's (the official candy of the Y2K bug), the next day KitKat bars. Ghirardelli next? Or See's? :-)
-- Jonathan Leffler (jleffler_at_informix.com, jleffler_at_earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>Received on Mon Jan 11 1999 - 00:00:00 CET