SUNIL S. SINGH wrote:
>
> H! ....
>
> In a 4gl program I write
>
> UNLOAD TO abc.unl SELECT * FROM tab_chmast>
> It works fine, but my table name changes dynamically hence I rewrote
>
> LET sql_s = "UNLOAD TO abc.unl SELECT * FROM ",
> variable_containing_table_name
> PREPARE sql_str FROM sql_s
> EXECUTE sql_str
>
> It gives run time error -201 (syntax error)
>
> Any Ideas...
>
> TIA
> Sunil
You cannot prepare an UNLOAD statement. It is something specific to
DB-Access (note the DB label against it in the SQL Syntax manual).
You can write in 4GL:
LET mystring = "SELECT * FROM tab_chmast"
UNLOAD TO "abc.unl" mystring
--Peter Lancashire
Information Systems Specialist, Bayer plc
Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK
Tel: +44-1635-562258, Fax: +44-1635-562281
---
If all else fails, read the instructions AND the release notes.
All opinions are my own and not those of Bayer plc.
My Internet plumbing does not allow me to mail and post news together.
Sorry.
---
Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/