Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL in ksh script question
A copy of this was sent to yogurt_at_stratos.net (yogurt)
(if that email address didn't require changing)
On Mon, 12 Oct 1998 09:50:51 -0400, you wrote:
>When I try to execute the following SQL from within a ksh script,
>the "$" (dollar sign) in v$sqlarea causes a problem, because
>the korn shell interprets it as a variable and the SQL fails:
>
> select substr(sql_text,1,30) sql , count(*)
> from v$sqlarea;
>
>Your help is appreciated.
>
>Dale
>yogurt_at_stratos.net
not sure about the ksh, but in csh and sh I use the following in my scripts:
select username, sid, serial#, process, status
from v\$session
where username is not null
/
I use the \ to escape the $ in the sh. should work for ksh as well...
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Oct 12 1998 - 09:02:07 CDT
![]() |
![]() |