DROP TABLE #t CREATE TABLE #t ( Field1 INT ) INSERT INTO #t (Field1) VALUES (1) SELECT * FROM (SELECT Field1 FROM #t WHERE Field1>0) a UNION SELECT * FROM (SELECT Field1 FROM #t WHERE Field1<1) b
and the above Select query, could it be that the Select is returning two rows? One with value 0 and one with value 1? Is it possible that the UPDATE query is run between the SELECT queries that are UNIONed?
UPDATE #t set Field1=0
From novice to tech pro — start learning today.