Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete duplicate records
Message
From
28/11/2006 06:09:11
 
 
To
27/11/2006 17:01:51
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01172620
Message ID:
01172878
Views:
27
To tell you the truth I can't be bothered refining the soln. when the asker can't be bothered either, or acknowledging the help, and just focusing on the person who he eventually chooses.

>Yes, but even you have one record it will found that record? :)
>
>>No, this just seeks the first one and deletes that. The flag gets you out of loop. And he doesn't want del all dupes -just 1 out of 3 (but it assumes there are always 3, as I said)
>>
>>>Don't you delete all records with that? He needed two records each key.
>>>
>>>>Metin
>>>>
>>>>Wouldn't it be best to set the order to the index Tariq had?
>>>>
>>>>Then (assuming always 3 of each or just 1), something like:
>>>>
>>>>

>>>>SCAN
>>>> llFound = .F.
>>>> lnRecNo = RECNO()
>>>> xdate = date
>>>> xvoucher = voucher
>>>> xtype = type
>>>> xSeekKey = DTOC( date) + str( voucher) + Type && NOTE not ALLTRIM( Type) when used in key.
>>>> Do while llFound
>>>> If INDEXSEEK( xSeekKey, .T., "ThisTable", "TariqsIndex")
>>>> Delete
>>>> llFound = .T.
>>>> Goto lnRecNo && Don't even think this necessary
>>>> Endif
>>>> EndDO
>>>>EndSCAN
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform