Subject | RE: [ib-support] Strange query results, based on where clause |
---|---|
Author | Ann W. Harrison |
Post date | 2002-03-05T22:44:57Z |
At 10:08 AM 3/4/2002 -0500, Leyne, Sean wrote:
rather than vice-versa. Very hard to preserve leading zeros
in that conversion. The conversion fails, of course, if it
finds any character other than a digit or a decimal point.
It could fail, I suppose, if it were converting from a string
to a number and the number had leading zeros.
On the third hand, when reading from an external file, it
is very desirable to be able to convert from 0098 to 98 -
assuming that the value was ascii in a fixed record-length
file and the database will store it as some variant of
numeric.
Regards,
Ann
www.ibphoenix.com
We have answers.
>...The solution is to make the unindexed resultThe problem is actually that it converts strings to numbers
>consistent. Meaning:
> - '0617' <> 617 and
> - '617' = 617
>but
> - '0617' <> 0617 and
> - '617' = 0617.
>
>The fact that the engine will convert integer values to strings is a
>convenience, it doesn't absolve the developers from using a little
>common sense when performing selects.
rather than vice-versa. Very hard to preserve leading zeros
in that conversion. The conversion fails, of course, if it
finds any character other than a digit or a decimal point.
It could fail, I suppose, if it were converting from a string
to a number and the number had leading zeros.
On the third hand, when reading from an external file, it
is very desirable to be able to convert from 0098 to 98 -
assuming that the value was ascii in a fixed record-length
file and the database will store it as some variant of
numeric.
Regards,
Ann
www.ibphoenix.com
We have answers.