J
JR
I have a bunch of data in a table say:
id,myname,grouped
1,joe,123
2,joe,123
3,sam,123
4,pete,456
5,mike,456
6,alan,456
7,sally,098
8,michael,098
9,joseph,098
Records are grouped together conceptually in the single table based on
the grouped value. So joe, joe, and sam are one grouping as they all
have 123 for their grouped value. I need to run an update query that
will set the "myname" value on all matching records to that of the
last value. Don't ask why I would want to replace the names in this
way, it's just an example. So after done, I would end up with:
1,sam,123
2,sam,123
3,sam,123
4,alan,456
5,alan,456
6,alan,456
7,joseph,098
8,joseph,098
9,joseph,098
Any ideas how to accomplish this? I have this in Access but could
easily put this in SQL server if it would help.
Thanks.
JR
id,myname,grouped
1,joe,123
2,joe,123
3,sam,123
4,pete,456
5,mike,456
6,alan,456
7,sally,098
8,michael,098
9,joseph,098
Records are grouped together conceptually in the single table based on
the grouped value. So joe, joe, and sam are one grouping as they all
have 123 for their grouped value. I need to run an update query that
will set the "myname" value on all matching records to that of the
last value. Don't ask why I would want to replace the names in this
way, it's just an example. So after done, I would end up with:
1,sam,123
2,sam,123
3,sam,123
4,alan,456
5,alan,456
6,alan,456
7,joseph,098
8,joseph,098
9,joseph,098
Any ideas how to accomplish this? I have this in Access but could
easily put this in SQL server if it would help.
Thanks.
JR