cant execute sqlplus from tcshell

Hi,
I'm having issues with executing sqlplus (silent mode) through the tcsh. (trying to save a value into a parameter...)
I assume that the issue is that there are new lines:

I tried the followings and got those errors:

set RESULT=`sqlplus -s USER/PASS@//localhost:1521/ABCD <<BLA
select * from dual;
BLA`

the result is: Unmatched `.

trying to do the command in one line doesn't work as well...

More than 10 people tried it already... but we are still left with no answer :slight_smile:

Thanks for the help,
Ori

Don't know tcshell (Csh Programming Considered Harmful) but shouldn't it be something like?

set RESULT=`sqlplus -s USER/PASS@//localhost:1521/ABCD <<BLA\
select * from dual;\
BLA`

that was my assumptation as well in the beginning...
but, I got the following errors when trying to do so:

BLA: Command not found.
set: No match.

Sorry, but why and what for tcsh?!
With the brillant ksh this is a way I'd do that,
but which should work with your shell too

DBRESULT=`sqlplus -s "$SQLLOGIN" << EOF
select * from dual
/
EOF
`

(whereas SQLLOGIN contains your username/passwd@db)

whatis BLA?
whatfor is it necessary to use set?

if this your csh 's feedback, I could imagine command-substitution is done differently than you do with putting into `blablabla` .. did that everworked with other substitutions of sqlplus..??

the original shell error message including whole terminal in-/out-put would help further interpretation..