SQL Server 2000 - When running the following update query I get a different set of results each time the stored procedure is run. I ran the stored procedure using a job 4 times, got 4 different results.
If I run the update query directly in Query Analyzer, my results are always the same.
The query:
Has anyone experienced this inconsistency?
If I run the update query directly in Query Analyzer, my results are always the same.
The query:
Code:
update COrdHz
set Racf = a.N_server_id
from nbtord a
where a.ord_nbr = COrdHz.order_num
and a.ord_supp = (select max(ord_supp) from nbtord b
where b.ord_nbr = a.ord_nbr and rtrim(ltrim(n_server_id)) is not null)
and ltrim(rtrim(N_server_id)) is not null
Has anyone experienced this inconsistency?