H
hermanko
Hi,
I need help with the SQL for an update query. The underlying query that
i want to update has duplicate records (shown below), by Fund Name
field, but all other data is different, including the Date field.
Included is a Yes/No checkbox field. I need to run an update query that
will select the "older" record by Date for each duplicate.
Sample query to be updated:
ID Fund Name Date Remove?
1 Fund16 3/20/2006 (checkbox)
2 Fund16 4/20/2006 (checkbox)
3 Fund21 3/20/2006 (checkbox)
4 Fund21 4/20/2006 (checkbox)
5 Fund35 3/20/2006 (checkbox)
6 Fund35 4/20/2006 (checkbox)
.....
I want to have the Update Query select only records 1,3 and 5 by
updating the "Remove?" field to TRUE.
The SQL that i have SO FAR (shown below) is only set up to set ALL
records to TRUE. I dont really know the syntax well enough to modify it
to my needs. Any assistance would be greatly appreciated!!!
UPDATE [Duplicate Fund Name (same Proxy)] SET [Duplicate Fund Name
(same Proxy)].[Yes/No] = True
WHERE ((([Duplicate Fund Name (same Proxy)].[Yes/No])=False));
thanks!
Herman
I need help with the SQL for an update query. The underlying query that
i want to update has duplicate records (shown below), by Fund Name
field, but all other data is different, including the Date field.
Included is a Yes/No checkbox field. I need to run an update query that
will select the "older" record by Date for each duplicate.
Sample query to be updated:
ID Fund Name Date Remove?
1 Fund16 3/20/2006 (checkbox)
2 Fund16 4/20/2006 (checkbox)
3 Fund21 3/20/2006 (checkbox)
4 Fund21 4/20/2006 (checkbox)
5 Fund35 3/20/2006 (checkbox)
6 Fund35 4/20/2006 (checkbox)
.....
I want to have the Update Query select only records 1,3 and 5 by
updating the "Remove?" field to TRUE.
The SQL that i have SO FAR (shown below) is only set up to set ALL
records to TRUE. I dont really know the syntax well enough to modify it
to my needs. Any assistance would be greatly appreciated!!!
UPDATE [Duplicate Fund Name (same Proxy)] SET [Duplicate Fund Name
(same Proxy)].[Yes/No] = True
WHERE ((([Duplicate Fund Name (same Proxy)].[Yes/No])=False));
thanks!
Herman