× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Not sure how the clauses "have no idea how many" and "a few dozens of records" are ensured to be congruous... but I offer anyhow:

The following SQL requests would suffice; implemented with full table-scan:

DELETE FROM The_File
WHERE
locate(
x'3F'
, translate(
the_bad_column
, x'3F'
, /* next two lines must be a contiguous hex constant */
x'000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F'
, x'3F'
)
) > 0

DELETE FROM The_File
WHERE
translate(
the_bad_column
, x'3F'
, /* next two lines must be a contiguous hex constant */
x'000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F'
, x'3F'
) LIKE ('%' concat x'3F' concat '%')

Note: if the character 0xFF is similarly problematic, despite the OP implying characters with a hex code point of less than 0x40, then add the x'FF' to the end of the from-string in the TRANSLATE scalar.

Regards, Chuck

On 03-Dec-2013 13:32 -0800, Booth Martin wrote:
In this instance the data is is only for stress testing. Losing a
few dozens of records won't impact what I am doing. and in a live
situation this same error would have already ground things to a
halt.

On 12/3/2013 3:05 PM, Jon Paris wrote:
Many - but can you be a bot more specific? After all just deleting
records is rarely a cure (or at least it is one where the cure can
be as bad as the disease).

Definition of fields? How were the records created, etc. etc.

On 2013-12-03, at 3:52 PM, Booth Martin wrote:

The file has about 2.5 million records. Some of those records, I
have no idea how many, give an error and my RPG program fails.
Is there a way to process the file and delete those troublesome
records?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.