Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting Intermittent Records from Table
Message
De
12/12/2017 10:08:12
 
 
À
12/12/2017 06:56:50
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01656282
Message ID:
01656331
Vues:
58
Its working Better in Speed what I have coded Earlier.
Thank you.

>Hi,
>
>SQL can not do this, because SQL does not depend on the order records are stored.
>In general even for dbx the order of records should mean nothing. This simply bad design
>
>All you can do is something akward dbx like (symbolic code)
>
>SELECT YourTable
>SET ORDER TO
>SET DELETED ON
>LOCATE FOR FieldXYZ=="/DeviceRGB {} cs"
>DO WHILE FOUND()
> SCAN WHILE !FieldXYZ=="(Section Ends Here)) 198.636 Tj"
>  DELETE
> ENDSCAN &&All
> DELETE
> LOCATE FOR FieldXYZ=="/DeviceRGB {} cs"
>ENDDO &&FOUND()
>
>
>HTH
>Lutz
>>I have a table with around 1000 records. I need to delete some range of records from it. The record I want starts with "/DeviceRGB {} cs" and Ends with "(Section Ends Here)) 198.636 Tj". I need to delete all the records between these two (including these two also).
>>
>>After "(Section Ends Here)) 198.636 Tj" again few records are there which I do not want to delete, but want to keep.
>>I want to delete all such instances from the Table.
>>
>>Currently I am using Locate for command and Recno() to acertain the record range and deleting all the occurrences. But this is taking enough time.
>>
>>Here is the record (Varchar) which I want to delete
>>
>>

>>0 Tc
>> [1 0 0 1 0 0] Tm
>>0 0 Td
>>/DeviceRGB {} cs
>>[0 0 0] sc
>>f
>>/DeviceRGB {} cs
>> [1 0 0 1 0 0] Tm
>>0 0 Td
>< ...........
>>In the above case I need to Delete records from 4 to 13 and 19 to 32. There may be n number of such cases in my table. Is there can be any SQL or command that can do it fast and at one stretch.
>>
>>Kindly Guide
>>Thanks as Always.
Harsh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform