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

Home -> Community -> Usenet -> c.d.o.misc -> Re: nvl and subquery

Re: nvl and subquery

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Mon, 05 Jul 1999 08:08:58 -0400
Message-ID: <3780A05A.1404C3B5@Unforgettable.com>


INSERT INTO EMP (COMM)
VALUES (SELECT NVL(COMM,99)

                  FROM EMP
                 WHERE EMPNO=8888);

WHERE EMPNO=7902; Your NVL() was in the wrong place.

Ken

celia9268_at_my-deja.com wrote:

> Hi, everybody.
> I would like to do an insert:
>
> SQL>insert into emp(comm)
> values ( nvl(select comm from emp where empno=8888), 99)
> where empno=7902;
>
> Unfortunately, this statement doesn't work. I know this can be done in
> pl/sql, but i really want to know whether this can be done in SQL?
> Please help.
>
> Regards
> celia
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Mon Jul 05 1999 - 07:08:58 CDT

Original text of this message

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