zackdade has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm new to using Win32::ODBC (and I can't seem to get DBD or DBI to work regardless of what I do), but I'm having problems joining tables... (here is a sample of the tables)
I get an environment variable for logged in user and place it in $AuthUser... I've tried a lot of things - the one actually worked in the SQL Analyzer but not from Perl...
Here is the code:
select APSVehicles.*, DlrLogins.* FROM APSVehicles INNER JOIN DlrLogins ON APSVehicles.Dealer = DlrLogins.P1 or APSVehicles.Dealer = DlrLogins.P2 WHERE DlrLogins.UserID = '$AuthUser' ORDER by DLRID";
Any help would be appreciated! I've spent a lot of time banging my head on the wall :(.
Thanks - Zack
Code tags added by davido.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question about joins?
by legato (Monk) on Jan 14, 2005 at 16:49 UTC | |
by zackdade (Initiate) on Jan 14, 2005 at 16:58 UTC | |
by Grygonos (Chaplain) on Jan 14, 2005 at 19:32 UTC | |
|
Re: Question about joins?
by jZed (Prior) on Jan 14, 2005 at 16:44 UTC | |
by zackdade (Initiate) on Jan 14, 2005 at 16:48 UTC | |
by jZed (Prior) on Jan 14, 2005 at 16:56 UTC | |
by zackdade (Initiate) on Jan 14, 2005 at 17:01 UTC | |
|
Re: Question about joins?
by Mutant (Priest) on Jan 14, 2005 at 16:39 UTC | |
by zackdade (Initiate) on Jan 14, 2005 at 16:44 UTC |