Re: Valid statements inside an SP.
Posted in 1996
M Ferris <mferris@wwa.com> wrote:
:Can someone tell me whether the Unload and output statements are
:invalid in a stored procedure? Someone here is trying to dump query
:results into an ASCII file from a stored proc, and can't figure out
:how. The unload and output statements both generate errors in compiling
:the stored proc.
:Please copy response to email mferris@wwa.com.
Neither unload nor output are sql commands. They are not in the sql
standard and not implemented by Informix in their engines, and can
therefore not be used in stored procedures.
These commands are only implemented in some Informix tools such as
dbaccess.
If you think about it they require a filename, and from the engine it
isn't immediataly obvious where that file should go. They could of
course require an absolute filename and be written on the database
server, but Informix has not implemented such an option.
One thing you can do is use the system command to start dbaccess with
one of these commands to write output to a file on the server.
Nils.Myklebust@idg.no <- New E-mail adress
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company