Re: problem with unload in esql
Posted in 1995
You cannot use unload as an embedded SQL statment. There is a work around that
problem, i use the following:
sprintf(str,"unload to 'inftest.doc' select * from garden where bugs>1000 | dbacess <dbaname>");
rc = system(str);
if(rc != 0 ) {
/*error in unload */
}
I hope this helps. As far as i know you cannot embedd unload statemetnts in ESQL/C.
Shyam
In article EHK@actcom.co.il, gis@actcom.co.il (Harel Shemer) writes:
>I would like to use the load and unload commands in esql\\c but they do
>not seem to work - it does not seem to recognize these commands. I am
>using informix version 6. Does anyone know how I could get it to work or
>what the best way around it is. The code that I would like to use looks
>similar to the following:
>
>EXEC SQL UNLOAD to "infested.doc"
> SELECT * FROM garden
> WHERE bugs > 1000>
>Aryeh Levin
>