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



I agree the readability is important, but I also agree with John that
Chuck's reply is, at the most, arguably harder to read.

In general it's better to convert the input variable and not the table
being searched.
Do this:
select customer_number, customer_name from customermaster where
customer_number=decimal(:custNumAsChar,6,0);
Not this:
select customer_number, customer_name from customermaster where
digits(customer_number)=:custNumAsChar;
If you have an index over customer number the former will use it but the
latter won't.

See if that's a simpler example to run by your coworkers. One is not more
readable than the other.



Rob Berendt

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.