Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting Intermittent Records from Table
Message
From
12/12/2017 06:56:50
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
11/12/2017 14:24:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01656282
Message ID:
01656326
Views:
83
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.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform