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



Hi All,

Scenario:
I have 1. Physical File with Part numbers ( that have one or more of the dash character embedded in them )
   2. Logical file with the part Number as the only key
3. A requirement to validate these part numbers when the users enter them with misplaced dashes. The requirement from the user is "remove all dashes in the entered part number and check if that exists as a valid part number. 4. I think that there are more transactions that know the real part number than there are that have misplaced dashes. ( But I cannot be sure )
   5. I am on a V5R3 Box.

Possible solutions:

1. Select * from part where replace(partNumber, '-', '' ) = partNumber.replace( '-', '' ); In light of the recent discussion about date field equalities this might be a bad solution.

2. Create a post update/insert/delete trigger that will write another table with the partNumber and "partNumber without dashes" and create a logical on the "partNumber without dashes", check against that

Question:

   1. Given the scenario which is the best approach that I can take ?
   2. Is there a general pattern to answer questions of this nature ?

Thanks in advance for your time.

Pillai

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.