ISQL Shell Script Question

I am trying to run the following Sybase SQL query in a shell script file. It isn't working although everything else in the file runs, and I can run queries from a file fine. For some reason, entering the query directly doesn't work. Any ideas?

#!/bin/sh

$SYBASE/$SYBASE_OCS/bin/isql -e -S$SERVER -Jcp437 -U$USER -P$PASSWD <<EOF
update request
set status = 'ERROR'
where rid = '$RID'
go
EOF

Try putting $RID in double quotes instead of single ones.

Nope, that didn't work. Any other ideas?