Update table where column cell is empty

Heidestrand

Registered User.
Local time
Today, 09:27
Joined
Apr 21, 2015
Messages
73
Hello,

I have a small problem: I have a table with over 20 columns. In every column there are some 1's, but the other cells or tuples are empty. In these empty cells I want to write a 0. So I need an UPDATE query.
But what should I write for the WHERE condition? So he should check every cell and if there's no 1, write a 0.

Can you please help me very quick? Thanks in advance =)


Best regards,

Heide
 
Are you able to write a query (for one column only) which will return a list of all the empty rows for that individual column?
 
Actually I wanted to update all columns at once.
I could write one for one column, saying like:

UPDATE tbl1
SET c1 = 0
WHERE c1 ISNULL;

But I have like 20 columns in my table ;)
 
You will need to write 20 separate queries. Alternatively you could modify your table so that it takes advantage of Microsoft Access properly and do it with one query.
 
Thank you for your answer, Uncle Gizmo.

I'm curious, how would I modify my table to take advantage of Microsoft Access?
I'm still new to Access :/
 
Thank you for your answer, Uncle Gizmo.

I'm curious, how would I modify my table to take advantage of Microsoft Access?
I'm still new to Access :/
I think you should be able to see my previous post which answers this question.
 

Users who are viewing this thread

Back
Top Bottom