You realise you just posted to dbi-users when your not even using DBI!
You should be though. Look for the DBI and DBD-ODBC packages. There is a
slightly different syntax to use but get used to it.

On the other hand, this is perfectly viable for discussion here. Your JOIN
syntax is wrong and pretty illegal.

What you want is:

SELECT  A1.DefaultIPGateway0, A1.IPAddress0, A1.IPSubnet0,
        A1.MACAddress0, A2.Name0, A2.UserName0,
        EID00, EID, FNAME, LNAME, ORG, ROOM
FROM $Table A1 INNER JOIN $Table2 A2 ON (A1.MachineID = A2.MachineID)
INNER JOIN $Table3 A3 ON (A2.MachineID = A3.MachineID) 
LEFT OUTER JOIN $Table4 A4 ON(A3.EID00 = A4.EID)

This bit is also screwy: 

AND A1.IPAddress0 <> ''
AND A1.IPAddress0 <> '0.0.0.0'
AND A1.IPAddress0 <> '10.10.10.10'

Try this:

WHERE A1.IPAddress0 NOT IN ('','0.0.0.0','10.10.10.10')


Pretty Clear?

--Neil

> -----Original Message-----
> From: Patricio M. Rueda [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 5:33 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie looking for some Win32::ODBC Help
> 
> 
> Could some one help me here and tell me what's wrong with the 
> following
> code:
> 
> #=============================================================
> ============================
> 
>     $DSN= "IPMac";
>     $Table="dbo_Network_DATA";
>     $Table2="dbo_Computer_System_data";
>     $Table3=" dbo_User_data";
>     $Table4="cids";
> 
> 
> 
>     use Win32::ODBC;
> 
>     if (!($db = new Win32::ODBC($DSN))){
>         print MACHINES "Failure  no good " . 
> Win32::ODBC::Error(). "\n\n";
>     }else{
>         print MACHINES "Success (connection #", 
> $db->Connection(), ")\n\n";
>         $ip="";
> 
> 
> 
>         if (! $db->Sql("SELECT  A1.DefaultIPGateway0, A1.IPAddress0,
> A1.IPSubnet0,
>                                  A1.MACAddress0, A2.Name0, 
> A2.UserName0,
> EID00, EID, FNAME, LNAME, ORG, ROOM
> 
>                      FROM $Table A1, $Table2 A2,
>                                     $Table3 A3 LEFT OUTER 
> JOIN $Table4 A4
> ON(A3.EID00 = A4.EID)
> 
>                      WHERE ((A1.MachineID = A2.MachineID)  AND
> (A1.MachineID = A3.MachineID))
>                                       AND A1.IPAddress0 <> ''
>                                       AND A1.IPAddress0 <> '0.0.0.0'
>                                       AND A1.IPAddress0 <> 
> '10.10.10.10'
>                            ")){
>      }
> #=============================================================
> ===========================
> 
> 
> I am trying to use (4)  MSAccess Tabels, two of which need to be join.
> 
> I am getting the following error:
> 
> -3530[Microsoft][ODBC Microsoft Access Driver] Join expression not
> supported.10
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

__________________________________________________________________________
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.


Reply via email to