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
DELETE
LOCATE FOR FieldXYZ=="/DeviceRGB {} cs"
ENDDO
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.
OffThere is no place like [::1]