This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id:
53416
Status:
stalled
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
mjp [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Wishlist
Broken in:
1.23
Fixed in:
(no value)



Subject: TRIM(FROM) broken in select list
SQL-Statement/SQL-Parser 1.23 cannot handle the "FROM" word in a TRIM() function in a SELECT clause.  Here's an excerpt of the attached demonstration script showing some failures:

    SELECT TRIM(BOTH 'x' FROM col) FROM tbl
    ------------------------------
    Can't find alias in FROM clause! at /home/mjp/.perl/5.10/lib/site_perl/5.10.1/SQL/Parser.pm line 2894, <DATA> line 8.

... and so on.  See also this discussion forum post:  http://stackoverflow.com/questions/1975526/do-sqlstatements-regex-and-trim-work-with-dbdcsv
Subject: trim-bug.orig

Message body not shown because it is not plain text.

Same for SUBSTRING() - this is, because the parser splits between the elements to select and tables to select from at the first found keyword /FROM/i.
I'm not sure whether this will be fixed in 1.xx series of S:S.

Thanks for reporting anyway.

Jens


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.