Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default SQL statement for left outer join for ranges in the same file

Hello,

I need a left outer join between 2 ranges in the same workbook (2
sheets). I created the sql statement using the MS-Query tool however
it references a database (the file on my C drive) and creates a
separate script file (.qdy). I have a 2 part question:

1) Can I accomplish the join where there is no concept of opening an
external database? My database is the file I am in. I need the file to
to be portable and self referencing as far as the database goes.

2) Along the same lines: can the qdy file be part of the xls file and
be executed as a macro or in VBA? I have tried using the sql directly
using sqlexecquery statement but that requires opening a database etc.
and probable other References to pass syntax check for sqlopen etc.

Instead of the sql, would it just be more efficient to use index/match
functions to do the lookup on the target range (the left outer range)
and then convert the formulas to values?

Thanks,

Manish

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
outer join in query JD Excel Discussion (Misc queries) 0 June 10th 09 07:35 PM
Require help related to Excel Query outer join problem CJ Excel Discussion (Misc queries) 0 August 2nd 07 02:32 AM
Outer join with 3 tables using MS Query [email protected] Excel Programming 1 February 16th 07 04:16 PM
Outer join with 3 tables using MS Query [email protected] Excel Programming 0 February 16th 07 03:25 PM
MS Query Outer join with three tables Jim Excel Discussion (Misc queries) 0 February 15th 07 09:52 PM


All times are GMT +1. The time now is 02:46 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"