Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> update from table prob
Hi folks,
take a look at this:
select count(*) from temp
result: 1700
select count(*) from temp t, person p where t.person_id = p.person_id;
result: 1700
select sum(count(*)) from person
group by person_id having count(*) = 1
result: 2500
update person p set p.a_date =
(select to_date('31.12.1997', 'DD.MM.YYYY') from temp where person_id =
p.person_id)
2500 rows updated !!!
How can this be ? I'm expecting, that the update-query updates
all rows in table person with an person_id that occurs in table temp
(1700
rows).
But obviously all rows (2500) in table person are updated.
Any ideas / suggestions ?
Thanks
Peter
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 18 1999 - 11:33:34 CDT
![]() |
![]() |