Sanjiv Jivan wrote:
>
> The distinct clause in an SQL query does not work in
> some cases.
> ...
>
> For some reason it treats 400-522 and 400-523 as the
> same.
Are you running with warnings (-w)? If not, you should be. If so, you
will probably see something like this warning:
Argument "400-522" isn't numeric in numeric comparison (<=>) at
C:/usr/local/site/lib/SQL/Statement.pm line 289, <GEN1> line 5.
This is a problem in SQL::Statement's definition of numbers. The
following patch fixes it. Make these changes at line 283 of
SQL::Statement:
### JZ MOD
# } elsif ($c =~ /^\s*[+-]?\s*\.?\s*\d/ &&
# $d =~ /^\s*[+-]?\s*\.?\s*\d/ ) {
} elsif ($c =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/ &&
$d =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/) {
###
--
Jeff