Hi!
My problem is that I wish to update a database through a visual basic application.
The database I wish to update has two columns "name" and "date".
There could be more than one instance of the same name in a field. For example you can have the name "Jim" about 4 times, but for every name Jim,there is only one "date" value. That means that name and date will make a unique field. The issue is that for every name, I would like to update only the record that
corresponds to the latest date. So if the " name" field has many names and the name "jim" occurs 4 times with corresponding dates such as 1980, 1970, 1960 and 1990, I only want to change the 1990. Is there anyway i can do
this through an SQL. I was able to run a select SQL which selects the
latest dates group by name. However, this cannot work with UPDATE as a subquery.
Hope you can help me out. Thanks.
Chris [sig][/sig]
My problem is that I wish to update a database through a visual basic application.
The database I wish to update has two columns "name" and "date".
There could be more than one instance of the same name in a field. For example you can have the name "Jim" about 4 times, but for every name Jim,there is only one "date" value. That means that name and date will make a unique field. The issue is that for every name, I would like to update only the record that
corresponds to the latest date. So if the " name" field has many names and the name "jim" occurs 4 times with corresponding dates such as 1980, 1970, 1960 and 1990, I only want to change the 1990. Is there anyway i can do
this through an SQL. I was able to run a select SQL which selects the
latest dates group by name. However, this cannot work with UPDATE as a subquery.
Hope you can help me out. Thanks.
Chris [sig][/sig]