How to create a procedure that goes from the top of the table and compares the value to null - If a match is found, insert an element in this position. - If not, the element is inserted into a new row
I need to correct a second row which contains null values in 4 last columns regardless of values in the Id and PropertyId columns
Here is a screenshot of my DB
Here is a samples of data:
Now it works so, which is not suitable to me, instead it should update the row with null values like on the last screenshot
But the next entry should overwrite the value of NULL for Item, ItemId, InstanceId and Instance
Write a stored procedure like:
You have to check the syntax because I cannot test my code right now.