Re: Compound index and unique
From: Fred Taylor (ftaylor_at_mvps.org!REMOVE)
Date: Sat, 19 Feb 2005 11:15:33 -0700
Yes, that is the purpose of GROUP BY, to create groups of like items. The
MIN() will return the earliest date within that group.
-- Fred Microsoft Visual FoxPro MVP "Charles" <email@example.com> wrote in message news:firstname.lastname@example.org... > On Sat, 19 Feb 2005 11:00:31 -0700, "Fred Taylor" > <email@example.com!REMOVE> wrote: > >>Forget about using a UNIQUE index, you're just asking for trouble and/or >>corruption. >> >>If you need a list for display purposes, then do a SQL SELECT using the >>MIN() SQL function: >> >>SELECT item,MIN(yourdate) FROM yourtable GROUP BY item INTO CURSOR >>somecursor > > > The list is then link back to an cursor to replace the earliest date > all items with the earliest I get from the filtered or subset I have. > Then use the earliest date to determine a offset to the start of the > other activity. > > So the grouping by will return me my uniqueness of the item? > > Thanks for the quick response.