Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ORA-01427. need help with the "where exists" part
i've had this error before, and have found solutions on google groups
(using where exists(select null etc.)...but this is a little different
because of the where clause and I'm updating from the same table. if
anyone has ideas, I'd appreciate it. thanks.
I'm concatenating two columns with and adding a 0 between them, except when the month is = 10. example:
ldg_prd_desc_yr ldg_prd_desc_mo --------------- --------------- 2004 2 2004 4 2004 8
and I want to combine the two columns to get this
200402
200404
200408
here is the query:
update prd_stat
set ldg_prd_desc =
(select ldg_prd_desc_yr|| '0' || ldg_prd_desc_mo
from prd_stat
where ldg_prd_desc_mo <> '10')
where exists (select null from prd_stat where ldg_prd_Desc_mo <>
'10')
this is on oracle 8.1.7
thanks
MT
Received on Mon May 03 2004 - 20:29:20 CDT