Hi all,
Im running a update query like this to update multiple rows(about 1000).
Example of query:
UPDATE DATA1 SET Column = CASE WHEN TIME = 0 THEN X
WHEN TIME = 1 THEN y
WHEN TIME = 2 THEN Z
WHEN Time = 3 THEN Q END
The problem is the query sets all other rows to NULL in ms sql database.
I only want the query to update the rows in the WHEN THEN statement and leave the other rows in the column as is.
It seems like it ads a
WHEN Time = 3 THEN Q ELSE NULL END
to the last statement.
Is there a way to avoid this? Or maiby there is a better solution for this problem?
thanks!
Alex