Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 'mandatory not null' dilemma
There is a row in table_2 that is not matched by your where clause in
table_1. That will return a NULL. I hope that your sample SQL is just
that, because updating the two columns that you join on is performing no
useful work.
James
In article <7ieu2c$bgb$1_at_nnrp1.deja.com>,
damon_short_at_aon.com wrote:
> This was addressed awhile back, but I still don't understand why the
> following won't work:
>
> UPDATE table_2
> SET (column_1,column_2)=
> (SELECT column_1,column_2 from table_1
> where table_1.column_1=table_2.column_1
> and table_2.column_2=table_2.column_2)
>
> These are 'not null' fields, but NONE OF THE ROWS IN table_1 are NULL.
>
> yet I get:
> ORA-01407: cannot update mandatory (NOT NULL) column to NULL
>
> There has to be some syntax I'm missing, and I'm relatively new to
> Oracle, so any insight is greatly appreciated.
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>
--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Tue May 25 1999 - 15:26:05 CDT
![]() |
![]() |