"Christopher J. Crane" wrote:
>
> I usually have great success with this module but lately, I am running into
> all sorts of problems. This is one is killing me. If anyone can tell me what
> what's wrong, I would really appreciate it. It's possible it's me now
> though, I have been at this one for 28 hours straight.
>
> I have simplified the problem but here it is:
>
> SQL Statement is this.
> "SELECT DISTINCT ProductLineName FROM SBR"
>
> Here is a sample of the CSV file.
> #############################################################
> "ProductID","Category","CategoryName","ProductLineName","ProductLine"
> 159,"sbr","Silicon Bridge Rectifiers","3PB2500","3PB2500"
First:
Please only write to the dbi-users list, there is no reason to send
copies to the authors, we read the list and do not enjoy getting
multiple copies of requests.
Second:
Please use warnings and strict when you run a script because they will
tell you information that is needed to solve your problems. In this
case the warnings would have said this, if you had had them on:
Argument "3PB2500" isn't numeric in numeric comparison (<=>) at
C:/usr/local/site/lib/SQL/Statement.pm line 285, <DATA> line 14.
Which might not have told you very much but it tells me that you are
being bitten by the problem of the current SQL::Statement that treats
anything that looks remotely like a number as a number (in this case it
tries to numerically compare '3PB2500' when it should be using a string
comparison).
Third:
This problem is fixed in the upcoming new SQL::Statement. It will be on
CPAN within a week or so, if you need a fix sooner, replace the regex on
lines 283 and 284 of SQL::Statement with this one:
/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/
--
Jeff