> What I need to accomplish is to set the min date of each group as the
> final date in the table.
> Example: Seq 1,2,3 is the 1st group. Seq 4-7 belongs to the 2nd group.
What we have here is a Major Design Problem. I can hardly imagine how you
would even tell what "group" a particular record belongs to: it's a very
complex SQL select with at least two subqueries.
Why not do things the easy way, and just put in a foreign key pointing at
the Groups table? At that point, your question collapses into a simple
MIN([SomeDate]) aggregate query.
Incidentally, your object naming strategy needs some attention. [Date] is
a reserved word in SQL and VBA and using it here will bite you later. It
seems you have two of them in the same table, too. [Tag] is a control
property name and will also likely cause some difficult bugs unless you
are very careful.
Hope that helps
Tim F
Rob - 01 Feb 2006 17:58 GMT
Hi Tim
thanks for your quick response.
The Field names here are just for illustration purposes. In real table,
they're named differently. As with the group, the Seq can vary from 1 to 20
and the S,E flags can be anywhere in between those Seq numbers. That's my
dilemna. I tried creating a group table and joined it to this table, but the
result is not favorable. Any more suggestions?
Thanks,
Rob
> > What I need to accomplish is to set the min date of each group as the
> > final date in the table.
[quoted text clipped - 17 lines]
>
> Tim F
Tim Ferguson - 02 Feb 2006 20:42 GMT
=?Utf-8?B?Um9i?= <Rob@discussions.microsoft.com> wrote in news:E6868B4F-
9FA9-43C4-B4A2-10448CC1BC8F@microsoft.com:
> I tried creating a group table and joined it to this table, but the
> result is not favorable. Any more suggestions?
Apart from Get The Design Right, no.
Sorry.
Tim F