× 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 the first case T2.characterfield has first to be converted in an int to make the comparison to T1.numericfield which results either in a match or not. The comparison has to be made and thus the conversion has to be made. Hope the explanation is clear enough.

Mihael

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Thursday, June 03, 2010 11:57 AM
To: Midrange Systems Technical Discussion
Subject: Is this me or another SQL bug?


Ok the odds that it's a bug instead of me must be a million to one, but as we've now had 2 bugs fixed I thought I'd ask.

In T2, characterfield contains numbers and letters :

SELECT * FROM T1, T2 WHERE
int(T2.characterField) = T1.numericField

Erreur de sélection ou d'omission dans la zone Cast(T2.characterField AS Integer) du membre T1.

I hope the message is easily readable, I didn't want to translate and give a message that was not exactly the same as the English version. Not sure that I understand the reference to T1. The error is because of int('ABCetc').


Now, by adding T2.Type I can select only characterfield values that I know contain only numbers, so this works :
SELECT * FROM T1, T2 WHERE
int(T2.characterField) = T1.numericField AND T2.Type = 'A'


My question is why should I need to do this? I have only asked for records where int(T2.characterField) is equal to to T1.numericField so shouldn't those that provoke the error be ignored? It would seem that the Int is not performed on all the records in the 2nd statement.

Thanks

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.