In a part of my data warehousing stored procedures, i have a procedure that compares old project data to new project data (old data is in a table, new in temp table) and updates the old data.
The weird part is that if the old data is null, then the update statement doesn't work. If i add a is null statement the update works fine. My question is, why doesn't this work like i thought it would?
One of the multiple update statements:
update cube.Projects
set prServiceLine=a.ServiceLine
from @projects1 a
inner join cube.Projects
on a.WPROJ_ID=cube.Projects.pk_prID
where prServiceLine<>a.ServiceLine