Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default ADO left join sorting issue

Hello,

I'm using the following SQL statement to join 2 tables based on a common key

Sql = "SELECT * FROM " & rs1 & " AS T1 LEFT JOIN (SELECT DISTINCTROW * FROM " & rs2 & ") AS T2 ON T1." & CommomVar(1) & "=T2." & CommomVar(1)

It works fine but there are instances where the result is sorted by the common key rather than the original order in T1. Actually , I don't look for any sorting

I'm not able to figure out the logic as sometimes it work fine (no sorting)

Any idea?

Thanks
Avi
Reply
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
ADO left join count matches [email protected] Excel Programming 0 May 13th 14 12:21 PM
SQL statement for left outer join for ranges in the same file [email protected] Excel Programming 0 October 12th 07 12:41 AM
Subquery after Left Join Pontificateur Excel Programming 1 January 19th 06 02:51 PM
LEFT JOIN sql query Michael Malinsky[_2_] Excel Programming 2 August 28th 05 08:09 PM
ADO Recordset Problem -- Left Join ExcelMan Excel Programming 5 January 24th 05 08:53 AM


All times are GMT +1. The time now is 11:17 PM.

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"