Can a parameter be passed to embedded sql that uses an EOF ?
I would like to pass a parameter to the following code that uses an EOF
sqlplus username/password "Sample Text" <<EOF
prompt &1
select '&1' from dual;
exit;
EOF
However it does not seem possible to directly pass the parameter. The only workaround I have is to separate the code out to a separate script rather than use EOF embedding ( however I actually need to use this EOF embedding ) eg this workaround works but as above I need an EOF method
sqlplus username/password @myscript "Sample Text"
myscript.sql
=========
prompt &1
select '&1' from dual;
exit;
Has anyone any ideas on how to pass a parameter directly into the EOF method ?