Skip Menu |

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

Report information
The Basics
Id: 17703
Status: new
Priority: 0/
Queue: SQL-Abstract-Limit

Owner: Nobody in particular
Requestors: alan.humphrey [...]

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: (no value)

Subject: GenericSubQ doesn't handle table alias
Download (untitled) / with headers
text/plain 596b
If you have a table name using an alias the generated SQL is bad. Code: my @fields = ('me.artistid,'); my %where = ( 'me.artistid' => { '>' => 0} ); my @order = ('me.artistid'); my $sql = SQL::Abstract::Limit->new( limit_dialect => "GenericSubQ"); my $stmt = $sql->select('artist me', \@fields, \%where, \@order, 3, 2 ); print $stmt . "\n"; Produces: SELECT me.artistid, FROM artist X me WHERE ( me.artistid > ? ) AND ( SELECT COUNT(*) FROM artist WHERE me > ) BETWEEN 2 AND 5 ORDER BY me DESC Note the problematic SQL following the first FROM and the second WHERE.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to