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: Inserting surname of Null from a subquery results in a NULL value

Re: Inserting surname of Null from a subquery results in a NULL value

From: Frank Piron <empty_at_zero.nil>
Date: Fri, 10 Dec 2004 17:37:49 +0100
Message-ID: <opsiswhbdrm0et4w@news.online.de>


10 Dec 2004 08:07:32 -0800 <jbainbridge_at_gmail.com> wrote:

> Okay first up this is not a NULL vs. Empty String thing as I am well
> aware of that little gotcha but instead it is when a 'Null' string (a
> person's surname is actually Null) is returned by a subquery to be used
> in an insert or update statement it is actually inserting a NULL value
> instead of the text Null.
>
> Does anyone know a way around this amusing problem?
>
> Cheers,
> --
> Jason Bainbridge
> KDE - Conquer Your Desktop - http://kde.org
> KDE Web Team - webmaster_at_kde
>

SQL*Plus: Release 3.3.2.0.2 - Production

Copyright (c) Oracle Corporation 1979, 1996.

Verbunden mit:
Oracle8i Enterprise Edition Release 8.1.7.4.0 With the Partitioning option
JServer Release 8.1.7.4.0 - 64bit Production

SQL> update emp

   2 set ename='Null'
   3 where
   4 empno=7369;

1 Zeile wurde aktualisiert.

SQL> update emp eo

   2 set eo.ename=
   3 (select ei.ename from emp ei
   4 where ei.empno=7369)
   5 where
   6 eo.empno=7844;

1 Zeile wurde aktualisiert.

SQL> select ename

   2 from emp
   3 where empno=7844;

ENAME



Null

SQL> Any triggers working behind the scene?

-- 
Frank Piron,
defrankatkonaddot
(leftrotate two)
Received on Fri Dec 10 2004 - 10:37:49 CST

Original text of this message

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