L
Laura C.
I had to do a messy data import from Excel that has left me with a column
with several thousand blank fields. I'd like to figure out a way to populate
those fields using an update query.
The table (tblActiveNAs) has four columns:
NameField
Title
FirstElected
PositionEndDate
It's the NameField that's missing data. For example:
ID NameField Title FirstElected PositionEndDate
1 JOE VP 3/4/2007
2 SVP 3/4/2009 8/4/2010
3 VP 5/4/2009
4 WILL VP 3/1/2006
I'd like to populate the null fields in NameField with whatever the entered
value above is -- i.e., the NameField would be "JOE" for records 2 and 3.
It's okay if some of the PositionEndDate fields are null.
I tried to build an update query using some sample code that I found here,
but it's not working. What am I doing wrong?
UPDATE tblActiveNA, tblActiveNA AS tblActiveNA_1 SET tblActiveNA_1.NameField
= tblActiveNA.NameField
WHERE (((tblActiveNA_1.NameField) Is Null) And
((tblActiveNA_1.ID)=tblActiveNA.ID+1));
Thanks in advance --
with several thousand blank fields. I'd like to figure out a way to populate
those fields using an update query.
The table (tblActiveNAs) has four columns:
NameField
Title
FirstElected
PositionEndDate
It's the NameField that's missing data. For example:
ID NameField Title FirstElected PositionEndDate
1 JOE VP 3/4/2007
2 SVP 3/4/2009 8/4/2010
3 VP 5/4/2009
4 WILL VP 3/1/2006
I'd like to populate the null fields in NameField with whatever the entered
value above is -- i.e., the NameField would be "JOE" for records 2 and 3.
It's okay if some of the PositionEndDate fields are null.
I tried to build an update query using some sample code that I found here,
but it's not working. What am I doing wrong?
UPDATE tblActiveNA, tblActiveNA AS tblActiveNA_1 SET tblActiveNA_1.NameField
= tblActiveNA.NameField
WHERE (((tblActiveNA_1.NameField) Is Null) And
((tblActiveNA_1.ID)=tblActiveNA.ID+1));
Thanks in advance --