Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Nested scalar functions in Oracle SQL? (easy)

Re: Nested scalar functions in Oracle SQL? (easy)

From: Ian Ledzion <ian.ledzion_at_xlgbow.com>
Date: Fri, 2 Mar 2001 08:34:07 +0100
Message-ID: <97nidi$civ$1@rex.ip-plus.net>

On SQL Plus 8.1.6.0.0 under W2K, Oracle 8.1.5.0.4 (Novell), this works fine:

SELECT SUBSTR(TRIM(' THIS IS MY STRING '),1,5) FROM DUAL -- Note leading and ending spaces;

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:hvht9tcb5q4hdsl4s1s1bc3bcoeppmmq5h_at_4ax.com...
> On Thu, 1 Mar 2001 11:50:33 -0500, Steven Healey
> <sphealey_at_MailAndNews.com> wrote:
>
> >In Oracle SQL (not PL/SQL, just a query design), can I nest calls to
 scalar
> >functions? For example, can I say
> > SUBSTR(TRIM(variable),1,5)
> > or
> > SUBSTR(SUBSTR(variable),1,5),2,4)?
> >
> >This is possible in every other programming language I have used, but I
 get
> >syntax errors from SQL Plus when I try it.
> >
> >sPh
>
> Sure you can. The trim function however doesn't exist, only the ltrim
> and the rtrim function.
> As you don't provide any specific statement and or any specific error,
> it is very difficult to help you out.
> Try verifying the proper syntax in the sql reference manual, online at
> http://technet.oracle.com
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
Received on Fri Mar 02 2001 - 01:34:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US