title: Python/SQL: Does Pandas Allow you to read in a SQL Query Containing Multiple Joins?
body: <p>I have a query containing multiple joins to tables, and it seems to execute without any errors on MSSQLServer Management Studio, but Pandas returns an error. </p>
  
  <pre><code>"SELECT Ca.LoanAgreementID, Ca.Amount, Ca.TransactionDate, Ca.ContactID, Ca.PaymentType, " \
        "Ca.CashLedgerType, Ct.KeyValue_String, Pt.KeyValue_String, Lo.AutoNumber, Lo.IssueDateFROM CashLedger as Ca " \
        "LEFT JOIN Enum.CashLedgerTypes as Ct " \
        "ON Ca.CashLedgerType = Ct.KeyValue_Int" \
        "LEFT JOIN Enum.PaymentTypes as Pt " \
        "ON Ca.PaymentType = Pt.KeyValue_Int" \
        "LEFT JOIN LoanAgreements as Lo" \
        "ON Ca.LoanAgreementID = Lo.LoanAgreementID"
  
  data = pd.read_sql(sql, connection)
  </code></pre>
  
  <p>Error is as follows: </p>
  
  <pre><code>pandas.io.sql.DatabaseError: Execution failed on sql 'SELECT Ca.LoanAgreementID, Ca.Amount, Ca.TransactionDate, Ca.ContactID, Ca.PaymentType, Ca.CashLedgerType, Ct.KeyValue_String, Pt.KeyValue_String, Lo.AutoNumber, Lo.IssueDate FROM CashLedger as Ca LEFT JOIN Enum.CashLedgerTypes as Ct ON Ca.CashLedgerType = Ct.KeyValue_IntLEFT JOIN Enum.PaymentTypes as Pt ON Ca.PaymentType = Pt.KeyValue_IntLEFT JOIN LoanAgreements as LoON Ca.LoanAgreementID = Lo.LoanAgreementID': ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'Ca'. (102) (SQLExecDirectW)")
  </code></pre>