http://qs321.pair.com?node_id=397055


in reply to Does DBI handle table alias?

It's highly, highly unlikely that DBI is the culprit. DBI doesn't interpret the SQL you pass through.

Does your query work if you run it directly against the database (using mysql or sqlplus or whatever command-line tool applies to the platform you're using)? If the tables are huge, your query could take a very long time to process.

Update
Just as an aside, it's stylistically nicer to put your search conditions separately from your join criteria, such as:

SELECT COUNT(*) FROM theTable A INNER JOIN theTable B ON A.column_2 = B.column_2 WHERE A.column_1 = ? AND B.column_1 = ?
Also, notice I changed your string interpolations to placeholders. If your driver supports it, placeholders are definitely the way to go.