I have a stored procedure which updates a table. This stored procedure is called using a daily job. 

The logic int the stored procedure is as below:

```
Update Basetable
Set amount = Isnull(actualamount, 0)
From Acutaltable
Where jobcode Like '[%A-Z%]'

Update Basetable
Set amount = amount + Isnull(actualamount, 0)
From Acutaltable
Where jobcode Like '[%0-9%]'

```

The `jobcode` column is updated with dynamic values every day (i.e: `[%A-Z%]` jobcodes may be replace `[%0-9%]` jobcodes). So if any of the above update block failed, the stored procedure results in wrong output. I handled this by adding this code before each update.

```
UPDATE Basetable 
SET amount = NULL

```

Apart from this how to handle the above scenario?

Thanks for the help.