Re: unload in esql
Posted in 1993
In article <1993Jul22.113510.2636@lmpsbbs.comm.mot.com> ramesh@miel_013.miel.mot.com (Ramesh Pathak) writes:
}
} 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.
}
I have two suggestions...
1) If memory serves me, the unload/load commands can be handled by the
back-end. Therefore, the following should work:
main()
{
$char *scratch;
scratch = "unload to xxtmp.unl select * from xxtmp";
$prepare xx_stmt from $scratch;
$execute xx_stmt;
}
2) A long time ago I wrote a program called "dblist" in both C-ISAM and
ESQL/C (it can also be compiled with c4gl). It won't take a C expert
to go in and change the ',' delimiter to a '|'. This program is
available on mathcs.emory.edu and das13.snide.com.
DAS
--
David Snyder @ Snide Computer Services - Folcroft, PA Current Release
is db4glgen-3.15
UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com