Re: Compound index and unique
From: Fred Taylor (ftaylor_at_mvps.org!REMOVE)
Date: 02/19/05
- Next message: Charles: "Re: Compound index and unique"
- Previous message: Charles: "Compound index and unique"
- In reply to: Charles: "Compound index and unique"
- Next in thread: Charles: "Re: Compound index and unique"
- Reply: Charles: "Re: Compound index and unique"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 19 Feb 2005 11:00:31 -0700
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
-- Fred Microsoft Visual FoxPro MVP "Charles" <clsuhr@cox.net> wrote in message news:t8oe11t1pr4edok6hpdm0tb069a4lm4pe4@4ax.com... > Having a problem getting a unique item and a min date for that object. > Any suggestions. I have a cursor with a number of items (repeat > several times with different dates. Need to be able to get a list of > item so the only appear once and have the earliest date. I'm at a > lost with the except of during a sort to a database and then doing a > unique index. But don't want to have to resort to that for speed > reasons. I'm running visual fox pro 6. > > Thanks Charles
- Next message: Charles: "Re: Compound index and unique"
- Previous message: Charles: "Compound index and unique"
- In reply to: Charles: "Compound index and unique"
- Next in thread: Charles: "Re: Compound index and unique"
- Reply: Charles: "Re: Compound index and unique"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|