RE: Update Statement (Thank you)

RE: Update Statement (Thank you)

 

  


Thank you for your overwhelming responses and suggestions. I have
decided to use PL/SQL. Apparently my update statement is updating the
correct rows but I am still worried as to why it is updating all the
rows. Some of you told me that there was nothing wrong with my
statement I tend to agree with you but I would still like to know whay
this statement is not working as expected.

Again Thanks.

Irene
-----Original Message-----
From: HRproject
Sent: 29 August 2003 09:15
To: LazyDBA.com Discussion
Subject: Update Statement


Hello

The weeks semms to be getting worse.
Please tell me what could be wrong with this statement.

update payments p
set p.salary = (select amount from diffs d where d.pfno = p.pfno)

Payments has 3885 records and diffs has 43 records

The above statement is updating 3885 records while it should only be
updating 43 records. There are no duplicates in both the tables.
________________________________________________________________________
___

DISCLAIMER:The information contained in or accompanying this e-mail is
intended for the use of the stated recipient only. It may contain
confidential,proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error,please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient.

Any views or opinions presented herein are solely those of the author
and do
not necessarily represent those of the Nation Media Group.
________________________________________________________________________
___

--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html

___________________________________________________________________________

DISCLAIMER:The information contained in or accompanying this e-mail is intended for the
use of the stated recipient only. It may contain confidential,proprietary or
legally privileged information. No confidentiality or privilege is waived or
lost by any mistransmission. If you receive this message in error,please
immediately delete it and all copies of it from your system, destroy any hard
copies of it and notify the sender. You must not, directly or indirectly, use,
disclose, distribute, print, or copy any part of this message if you are not
the intended recipient.

Any views or opinions presented herein are solely those of the author and do
not necessarily represent those of the Nation Media Group.
___________________________________________________________________________
Oracle LazyDBA home page