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: 1
Default INNER JOIN problem


a = "SELECT T1.field1, T1.field2 FROM Table1 AS T1 INNER JOIN Table2 AS
T2 ON T1.ID=T2.ID WHERE T2.field3=1"
Set rs = db.OpenRecordset(a)
It works

but
a = "SELECT T1.field1, T1.field2, T3.field4 FROM Table3 AS T3 INNER
JOIN (Table1 AS T1 INNER JOIN Table2 AS T2 ON S.ID_REL=R.ID_REL) ON
T1.ID=T2.ID WHERE T2.field3=1"

Set rs = db.OpenRecordset(a)
it doesn't work (Run-time error '3122': You tried to execute a query
that does not include the specified expresion 'field1' as part of an
aggregate function.)


--
stefantem
------------------------------------------------------------------------
stefantem's Profile: http://www.excelforum.com/member.php...o&userid=13594
View this thread: http://www.excelforum.com/showthread...hreadid=502409

 
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
Join tables like inner join in Access ryanp Excel Discussion (Misc queries) 2 July 18th 08 03:35 PM
Require help related to Excel Query outer join problem CJ Excel Discussion (Misc queries) 0 August 2nd 07 02:32 AM
join two spreadsheets Raya Excel Discussion (Misc queries) 1 July 14th 05 02:13 PM
join 2 spreadsheets Raya Excel Discussion (Misc queries) 2 July 13th 05 11:16 AM
ADO Recordset Problem -- Left Join ExcelMan Excel Programming 5 January 24th 05 08:53 AM


All times are GMT +1. The time now is 07:23 PM.

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

About Us

"It's about Microsoft Excel"