LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default ADO Recordset Problem -- Left Join

I'm trying to execute a query that joins two Excel tables. I need all the
records in the first table and those in the second table that match the (2
field) key in the second table -- the typical LEFT JOIN query situation.

Problem is, the recordset being returned only seems to bring back records
that match on fields in BOTH tables, as if I were doing an equi-join. I
don't understand this behavior, especially in light of my successful
execution of a RIGHT JOIN query moments earlier in the code.

Is there something I need to do to clear things out? Shown below is the SQL
used in the query. Thanks for your help.

SELECT T1.*, T2.* FROM tblEqpReportTLTempTbl As T1 LEFT JOIN
TranDataActTblTLTempTbl As T2 ON (T1.TranName = T2.TranName AND T1.Fund =
T2.Fund) WHERE T2.TranType ='DbtPro'

There are 76 records in tblEqpReportTLTempTL and 39 records in
TranDataActTblTLTempTbl that have TranType = 'DbtPro'. When I run the
query I get a recordset returned with 39 records. I should be getting 76.

Thanks.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem copying ADO recordset to Excel 2003 Peter Carr Excel Programming 1 January 4th 05 09:33 PM
problem in seek value in recordset with index. miao jie Excel Programming 2 September 14th 04 03:36 PM
ADODB Recordset problem Stefen Percoco Excel Programming 2 July 26th 04 06:31 PM
Recordset Problem - object is closed DBAL Excel Programming 0 June 4th 04 11:55 PM
Conceptual Problem with DAO/ADO Recordset Eddy[_3_] Excel Programming 0 September 8th 03 07:43 AM


All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"