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



In trying to develop the proper JOINs for a CREATE VIEW, I did many
SELECT statements. Just SELECT sent to the display. Once I was happy,
I added the CREATE VIEW (a, b, c) as... and ran that. Completed without
errors. Then SELECT * from view and boom! Mapping error.

In the end, it was an implicit cast on the WHERE clause. The column is
defined as CHAR(4) but it contains 4 decimal digits. At least, it does
for all most rows - there are other WHERE conditions that filter out the
rows with non-decimal data in them.

Apparently, the process behind the view is trying to implicitly CAST the
column even for rows where the other parts of the WHERE clause would
disqualify the row from inclusion.

In summary, the view went from:
WHERE a= and b= and c<>0

to:
WHERE a= and b= and c<>'0000'

Hope this helps someone else.
--buck



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.