Peter Groarke wrote:
>
> Hi,
> an unload command that works fine using dbaccess interactively
> wont work within a stored procedure. When I try to create the stored
> procedure it generates a syntax error, pointing at the first char
> of the unload statement. Is it the case that some SQL statements
> are not allowed within stored procedures ? I checked the UNLOAD TO
> documentation but could find nothing about this.
>
> -Peter Groarke
>
> BTW, here is the stored proc:
>
> create procedure sac()>
> unload to '/tmp/sac' delimiter '!'
> select * from blah;>
> end procedure;
>
> ( informix 7.23.UC7 for solaris 2.6)
You can't do unload in SPL. I normally use a generic SPL that is a
frontend to run command that calls dbaccess to do the unload. Not
ideal, but it works ie
execute procedure sp_unload(<tabname>, <filename>, <delimiter>)
where all the parametes are passed out the dbaccess script.
--
Paul Watson #
WF Software Ltd # It said run using Windows 95
Tel: +44 1436 674629 # or better in the manual
Fax: +44 1436 678693 # so I used Unix
www.wfsoftware.co.uk #