I have written this in my script but while running i am getting syntax error `(' unexpected.
unload to "$BACKUP_DIR/n_fac_fid-$clliname" select * from n_fac_fid where fac_accesskey in (select fac_accesskey From n_fac_ap_fid where ap_clli="$clliname");
Any help appreciated.
aren't you "missing" a couple of quotes?
Where I missed the quotes exactly?. Actually when I run the this line from command line it works. So I am not sure what I missed.
depending on what unload
is expecting as its arguments, you might need:
unload to "$BACKUP_DIR/n_fac_fid-$clliname" "select * from n_fac_fid where fac_accesskey in (select fac_accesskey From n_fac_ap_fid where ap_clli='$clliname');"
OR
unload to "$BACKUP_DIR/n_fac_fid-$clliname select * from n_fac_fid where fac_accesskey in (select fac_accesskey From n_fac_ap_fid where ap_clli='$clliname');"
1 Like