× 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.



On 11/19/2024 10:06 AM, DEnglander--- via RPG400-L wrote:
Does anyone know if there is a function in SQL like the RPG %CHECK
function where I can tell SQL to show me a list of rows where the contents
of a column does not contain a specific list of characters?

I am trying to use SQL to tell me the existing characters in a column, so
I can add logic to an RPG update program to create an error condition to
the user when they enter a character in the column that is not one of the
predefined allowed values. This is a CHAR(5) field

Perhaps REGEXP_LIKE()?

select * from myfile where not regexp_like(column_to_search, valid_ characters)

https://www.ibm.com/docs/en/i/7.4?topic=predicates-regexp-like-predicate#rbafzregexp_like__regexp_likecontrol


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-2025 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.