Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL in ksh script question
Mon, 12 Oct 1998 09:50:51 -0400, yogurt_at_stratos.net (yogurt) rambled:
>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.
Escape it with a backslash:
select substr(sql_text,1,30) sql , count(*) from v\$sqlarea;
You also need a group by.
Mark Styles
Spam my account, lose your account. Clear enough?
Religious tolerance is an oxymoron.
Received on Mon Oct 12 1998 - 09:11:15 CDT
![]() |
![]() |