Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting Intermittent Records from Table
Message
From
11/12/2017 14:24:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Deleting Intermittent Records from Table
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01656282
Message ID:
01656282
Views:
63
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
0 Tc
/F22_0 14 Tf
/F42_0 12 Tf
(Section Ends Here)) 198.636 Tj
0 Tc
 [1 0 0 1 0 0] Tm
0 0 Td
[0 0 0] sc
f
/DeviceRGB {} cs
[0 0 0] sc
f
/DeviceRGB {} cs
 [1 0 0 1 0 0] Tm
0 0 Td
0 Tc
/F22_0 14 Tf
/DeviceGray {} cs
0 Tc
 [1 0 0 1 0 0] Tm
0 0 Td
/F42_0 12 Tf
(Section Ends Here)) 198.636 Tj
0 0 Td
/F42_0 12 Tf
0 Tc
 [1 0 0 1 0 0] Tm
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
Next
Reply
Map
View

Click here to load this message in the networking platform