I'm trying to run a piece of SQL within a csh unix script (has to be csh, unfortunately) and have it set up as this:
set my_table_exists=`sqlplus -s uid/pwd << END\
set pagesize 0 feedback off verify off heading off echo off;\
select count(*) from all_objects where object_name = 'mytable'\
and OWNER = 'myowner';\
when I run the script it just returns:
Badly placed ()'s
I'm guessing it doesn't like the count(*) (?) but how can I get round this?
Any help much appreciated!