Re: unload in esql
Posted in 1993
->From: ramesh@miel_013.miel.mot.com (Ramesh Pathak)
->Subject: unload in esql
->Date: Thu, 22 Jul 1993 11:35:10 GMT
->Reply-To: ramesh@miel_013.miel.mot.com (Ramesh Pathak)
->Organization: Motorola Land Mobile Products Sector
->
-> I am using Informix v. 4.0 and the esql features.
->
-> I have a database which has about 20 odd tables in it.
-> I wanted to have a script which would load/unload to any
-> (from) table of this database, so thought of writing an esql/c
-> program.
->
-> ( beacuase I could locate only dbload utility but no counterpart
-> utility to dump contents of a particular table to an ascii file.
-> Though dbexport exists, but i can't use it dump contents of
-> a specific table)
->
-> The problem is, the unload/load sql commands available with the
-> isql are not available with esql/c.
->
-> So, is there any utility which I am missing? Or any suggestion/
-> comment on achieving this will be highly appreciated.
->
-> Thanks in advance,
-> Please post answers on the net, as it may be difficult reaching me
-> directly.
->
-> Ramesh Phatak
->
Ramesh,
I ran into this problem back in 4GL 2.10.03, before even dbexport existed.
My solution was to use 4GL reports to unload data for a table into a "|"
delimited data file. This is the unload half of the equation. Then I
could use either the dbload program or ISQL load command to reload the
data.
I'm pretty much a novice in C, but I don't see why you can't do the same
sort of unload in ESQL/C. Once the output file is properly formatted,
with "|" or your chosen DBDELIMITER, then you should be able to reload
using existing tools.
Regards,
Alan
+---------------------------+--------------------------------------------+
| R. Alan Popiel | Internet: alan@den.mmc.com |
| Martin Marietta, Tech Ops | Voice: 303-977-9998 |
| P.O. Box 179, M/S 5422 | My opinions may not reflect Martin policy. |
| Denver, CO 80201-0179 USA | In fact, we often disagree. |
+---------------------------+--------------------------------------------+