0

I need to update a column by adding a value in Access:

update table1 set column1 = column1+value

In the above, if column1 is null, then the table is not updated.

I need a function like in SQL Server:

update table1 set column1 = isnull(column1,0) + value

2 Answers 2

1

You do not give a data type for column1. The string concatenator is & not +, so consider:

UPDATE Table1  
SET Table1.AText = [AText] & "A", 
    Table1.ANumber = Nz([ANumber],0)+1;

In both these examples, the column (field) will be updated even if it is null.

Sign up to request clarification or add additional context in comments.

Comments

0

i think there is no option for it in query if you are using Access as database (Backend)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.