Re: Preparing an unload statement
Posted in 1996
Craig Ostrom (costrom@solair1.inter.NL.net) wrote:
: As Online 5 does not have a table-level backup facility, I am writing one in
: 4gl. Problem is, I get a syntax error when trying to prepare the unload
: statement for subsequent execution. The statement is:
: unload to "ae.unl" select * from ae;
: This works in isql but not in 4gl. Does anyone know if unload statements are
: invalid in 4gl?
: Thanks for your effort in advance.
The unload statement is valid in 4GL, but Informix doesn't allow you to
prepare it. However, you can use a variable in place of the file name and
select statement so that it's dynamic.
Example: let file_name = "ae.unl"
let sel_stmt = "select * from ae"
unload to file_name sel_stmt
Good luck.
--
Stefanie Vario
svario@zenacomp.com
ZenaComp Incorporated
http://www.zenacomp.com/zenacomp