How can I update the Nulls, with the values from access

How can I update the Nulls, with the values from access

I'm trying to update Nulls, with values directly above.  I know about Normalization, and bad database design.  I'm just experimenting with this concept as a fun exercise.

Here's the SQL that I'm testing:

UPDATE ID_Table SET ID_Table.ID = [Batch], ID_Table.Batch = DLookUp("[Batch]","ID_Table","ID"<>[ is null])
WHERE (((ID_Table.Batch) Is not Null));

What's wrong with my SQL?  How can I update the Nulls, with the values from above? 

UPDATE ID_Table SET [Batch] =
DLookup("Batch","ID_Table","ID=DMax('ID','ID_Table','ID<" & [ID] &
" AND [Batch] Is Not Null')")
WHERE [Batch] Is Null

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright