Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Does DBI handle table alias?

by VSarkiss (Monsignor)
on Oct 06, 2004 at 16:13 UTC ( #397055=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://397055]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-08-15 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?