Re: Unix to Oracle / Back

From: joel garry <>
Date: Thu, 16 Jul 2009 15:10:06 -0700 (PDT)
Message-ID: <>

On Jul 16, 2:03 pm, The Magnet <> wrote:
> I'm trying to accomplish this:
> estimates=`sqlplus -s $user/${password} << "  EOF"
>   set heading off feedback off verify off timing off
>   SELECT count(*)
>   FROM daily_estimates
>   WHERE TO_CHAR(date_appended,'YYYYMMDD') = '$yyyymmdd';
>   exit
>   EOF`
> I get nothing.  If I hard code an actual date in there, it works
> fine.  Why is Oracle not resolving the variable?  I've seen this on
> many pages and it works fine there.......
> Oracle 10g R2.  Using ksh......
> Many thanks!

Something bizarro with the eof quoting. Try removing the double quotes and moving the ending EOF to the beginning of the line. There's some other trick to do what you want but I can't quite remember what it is, something to do with the backquotes making things different, I think. I don't do it enough to remember all the nesting rules.


-- is bogus.
Received on Thu Jul 16 2009 - 17:10:06 CDT

Original text of this message