Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updates not correct

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
If I run the following script twice,I get different results.
Anyone know why ?

update steve_rev
set a.business_type = b.business_type,
a.history_amount = b.amount
from steve_rev a,
steve_tmp b
where a.account_no in ('3000', '5000')
and a.company_mnemonic = b.company_mnemonic
and a.treaty_number = b.treaty_number
and a.move_plan_code = b.move_plan_code
and a.period_ending_dt = b.period_ending_dt
and a.account_description = b.account_description
and a.account_no = b.account_no
and convert(char(8), a.posted_date, 112) = convert(char(8), b.
 
By you get different answers, do you mean that you get a different count of rows affected, or the values in the columns are different?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top