You cannot use unload within prepare.
You could do this way.
LET selstmt = "dbaccess dbname < 'UNLOAD TO ", DELETE_DIR CLIPPED,
gr_item.isn USING "<<<<<<<<<<", "dp", " SELECT * FROM process WHERE
process.isn = ", gr_item.isn,"'"
Just make sure you have proper quotes whereever necessary.
run selstmt
Vivek chaudhary
______________________________ Reply Separator _________________________________
Subject: LET statement in 4GL
Author: darkemperor.uk (darkemperor_uk@yahoo.co.uk) at internet
Date: 5/9/00 8:54 AM
I want to prepare an SQL statement from
the following LET:
LET selstmt = "UNLOAD TO ", DELETE_DIR CLIPPED, gr_item.isn USING
"<<<<<<<<<<", "dp", " SELECT * FROM process WHERE process.isn = ",
gr_item.isn
The prepare statement is falling over with a SQL -201 synntax error.
When I DISPLAY the selstmt from the program the output is:
UNLOAD TO /unloaddir/12345678dp SELECT * FROM process WHERE process.isn =12345678
If I cut and paste this into dbaccess it unloads the row correctly.
Any suggestions?