I have this table
Quantity | Response | Month | Year | Name
__________________________________________
2365 'Response1' 3 2014 (null)
1420 'Response2' 3 2014 'Name1'
2365 'Response1' 3 2014 (null)
750 (null) 3 2014 'Name2'
65 (null) 3 2014 (null)
I'm running this update in a stored procedure
update Table1
set Quantity = q,
Response = resp,
Month = monthv,
Year = yearv,
Name = namescreen
where Month = monthv
and Year = yearv
and Response = resp
and Name = namescreen;
the columns with null values are not getting updated
Quantity | Response | Month | Year | Name
__________________________________________
2365 'Response1' 3 2014 (null)
1500 'Response2' 3 2014 'Name1'
2365 'Response1' 3 2014 (null)
750 (null) 3 2014 'Name2'
65 (null) 3 2014 (null)
How can I solve this?
and Response=resp: if trying to update a column with a NULL value, wrap in an NVL using a dummy value:and NVL(Response, '-1') = NVL(resp, '-1')