Skip Menu |

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

Report information
The Basics
Id: 53416
Status: stalled
Priority: 0/
Queue: SQL-Statement

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

Bug Information
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
Download trim-bug.orig
application/octet-stream 838b

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