not updateable query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with 2 fields. Field1 has date and Field2 info. If Field1 is
NULL, I would like to populate it using the value from the table itself. I
have written an update query as follows. When I run it, it tells me that the
query is not updateable. How do I accomplish the task?

UPDATE test SET test.dt = (SELECT First([test].[dt]) AS Fdt FROM test HAVING
(((First(test.dt)) Is Not Null)))
WHERE (((test.dt) Is Null));

Thank you
 
Try:

UPDATE test SET test.dt = DLookUp("dt", "test", "dt Is Not Null")
WHERE (((test.dt) Is Null));
 
Thank you much. I had been struggling all day with the query.

Van T. Dinh said:
Try:

UPDATE test SET test.dt = DLookUp("dt", "test", "dt Is Not Null")
WHERE (((test.dt) Is Null));

--
HTH
Van T. Dinh
MVP (Access)



ria said:
I have a table with 2 fields. Field1 has date and Field2 info. If Field1 is
NULL, I would like to populate it using the value from the table itself. I
have written an update query as follows. When I run it, it tells me that the
query is not updateable. How do I accomplish the task?

UPDATE test SET test.dt = (SELECT First([test].[dt]) AS Fdt FROM test HAVING
(((First(test.dt)) Is Not Null)))
WHERE (((test.dt) Is Null));

Thank you
 
Back
Top