Jeff Zucker wrote:
> Alex Schuilenburg wrote:
>
>> Hi
>>
>> I have successfully been using DBD::CSV for the last year and recently upgraded
>> to Red Hat 7.0 from 6.2. The problem is that ever since the upgrade, the ORDER
>> BY clause on an ISO date field (i.e yyyy-mm-dd,m e.g. 2001-09-10) no longer
>> works. The sort comparison stops on the year (i.e. The same years are grouped
>> together but the comparison does not continue after the first '-').
>
>
> This is a well known problem with SQL::Statement, the module that does
> the actual ordering for DBD::CSV. You can try out the alpha version of
> the new SQL::Statement which solves the problem, or use it as an example
> to patch the old one. It's at:
>
> http://www.spiritone.com/~jzucker/SQL-Statement-0.2001.tar.gz
>
> Or if you wait a week, an even newer version will be available.
Thanks, with that info I managed a fix :-)
There are quite major diffs between the two revisions, and since we need a
stable platform, I patched the existing SQL-Statement-0.1020 drivers now that I
knew where to look for the problem. The fix was simple since old sources
merely looked for the valid start of a numeric rather than examine the whole
string. I used your is_numeric fn and the rest was simple.
I can make a patch available if anyone is interested.
Cheers
-- Alex