fwd: Re: dbaccess output formatting
Posted in 1998
Topics: Server Administration, Migration, Import/Export & Data Conversion
Use unload statement with dbaccess . e.g. of shell scripts
unload_sql = 'unlaod delimiter
unload_sql="unload to sqlout.xls "
/usr/informix/bin/dbaccess dbname - << EOF
$unload_sql
select * from xyzEOF
will generate | delimited file then you can ftp to excel or use Access. In
my opinion dbaccess is way beyond its time.
Thanks,
Rekha
-------------
Original Text
From: Jonathan Leffler <jleffler@informix.com>, on 6/17/98 10:13 AM:
To: "Mike Morris" <morrisma@sterlingdi.com>
Cc: <informix-list@iiug.org>
On Wed, 17 Jun 1998, Mike Morris wrote:
> As a new user to Informix, I wonder if there are any tools for
> formatting the output
> of dbaccess selects to make rows easier to read (spreadsheet-like)?
The SQLCMD program in the IIUG archives (http://www.iiug.org) has
the ability to output comma-separated values (CSV), which are
relatively easy to import into spreadsheet. That is a Unix
command; I don't know that anybody has ever ported it to Windows
95/98/NT. It isn't an official Informix product. I wrote it, so
this is a biassed recommendation. And I haven't formally tested
the CSV code for a while, so there could be problems in it.
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix -- see http://www.perl.com/CPAN
The following was included as an attachement. Please use UUDECODE
to retrieve it. The original file name was 'ATTRIBS.BND'.
begin 666 ATTRIBS.BND
M0F5Y;VYD(%!A8VME9"!!='1R:6)U=&5S`%1224)3*```````9G=D.B!293H@
M9&)A8V-E<W,@;W5T<'5T(&9O<FUA='1I;F<`````````````````````````
M````````````````````````````````````````````````````````````
M`%)E:VAA($MH86YD:&%D:6$`````````````````````````````````````
M``````````````````````````````````!9:&PV*U8K15=P````````````
M````````0F5Y;VYD(%!R;W!R:65T87)Y($1A=&$:`````!$`````````#0`D
M!0``````````````````````````3W)I9VEN86P@=&5X=)8#1G)O;3H@2F]N
M871H86X@3&5F9FQE<B`\\:FQE9F9L97)`:6YF;W)M:7@N8V]M/BP@;VX@-B\\Q
M-R\\Y."`Q,#HQ,R!!33H*5&\\Z(")-:6ME($UO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:7@@+2T@<V5E(&AT='`Z+R]W=W<N<&5R;"YC
M;VTO0U!!3@H*B`$#`)8#@@$"``(````6``(``0`!`(\\``````````@"0``<#
M````````./\\```````"0`0``````````35,@4V%N<R!397)I9@``````````
M````````````````````3/\\```````"0`0``````````0V]U<FEE<B!.97<`
M`````````````````````````````````0`!`$8``0!&`'(``0!R`(\\``0"/
M`)```@"0`/=_`@"X`/=_`@#Y`/=_`@`1`?=_`@!7`?=_`@!8`?=_`@":`?=_
M`@#8`?=_`@`4`O=_`@!5`O=_`@"7`O=_`@#8`O=_`@`4`_=_`@`5`_=_`@`<
M`_=_`@!<`_=_`@"6`_=_`@"7`_=_````````````````9``!I`$!2`,![`0!
MD`8!-`@!V`D!?`L!(`T!Q`X!:!`!#!(!L!,!5!4!^!8```````````````!D
M``&D`0%(`P'L!`&0!@$T"`'8"0%\\"P$@#0'$#@%H$`$,$@&P$P%4%0'X%@``
M$0`````````$`%`"``````````````````````````!497AT60%5<V4@=6YL
M;V%D('-T871E;65N="!W:71H(&1B86-C97-S("X@92YG+B!O9B!S:&5L;"!S
M8W)I<'1S"@IU;FQO861?<W%L(#T@)W5N;&%O9"!D96QI;6ET97(@(`IU;FQO
M861?<W%L/2)U;FQO860@=&\\@<W%L;W5T+GAL<R`B"B]U<W(O:6YF;W)M:7@O
M8FEN+V1B86-C97-S(&1B;F%M92`M(#P\\($5/1@HD=6YL;V%D7W-Q;`IS96QE
M8W0@*B!F<F]M('AY>@I%3T8*"G=I;&P@9V5N97)A=&4@?"!D96QI;6ET960@
M9FEL92!T:&5N('EO=2!C86X@9G1P('1O(&5X8V5L(&]R('5S92!!8V-E<W,N
M("!);B!M>2!O<&EN:6]N(&1B86-C97-S(&ES('=A>2!B97EO;F0@:71S('1I
M;64N"@H*5&AA;FMS+`H*4F5K:&$*(`KQ``,`60'J``$``0```!$``0`!``$`
M60$````````X_P```````)`!``````````!-4R!386YS(%-E<FEF````````
M```````````````````````!``$`.P`!`#P`/``!`#T`70`!`%X`@``!`($`
MJP`!`*P`MP`!`+@`R0`!`,H`S0`!`,X`S@`!`,\\`1@$!`$<!1P$!`$@!2`$!
M`$D!4`$!`%$!40$!`%(!5P$!`%@!60$!`%H!6@$```````````````!D``&D
K`0%(`P'L!`&0!@$T"`'8"0%\\"P$@#0'$#@%H$`$,$@&P$P%4%0'X%I\\``'<`
`
end