Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 1st, 2006, 05:22 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , .
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default left outer join 2 or 3 tables in ms access

Hi,
I have the following query.
This query works perfect when working with ms sql but when I try to use it with access db I get syntax error.
How can I use it with access???
when there is one "left outer join" no problem but with more than 1 we have difficulty.

RS1.Open "select Top 5 *,Exp_Users.*,(SELECT COUNT (*) from Exp_Answers WHERE Exp_questions.QID = Exp_Answers.QID ) AS REC_COUNT from Exp_questions left outer join Exp_Users on Exp_Questions.UserID=Exp_Users.UserID left outer join Exp_Category on Exp_Category.CatID=Exp_Questions.CatID where Exp_Questions.Status=1 order By Exp_Questions.Date_asked Desc" ,Conn,3,3




Reply With Quote
  #2 (permalink)  
Old February 2nd, 2006, 04:22 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

For some reason Access likes brackets around its joins, try...
Code:
RS1.Open "select  Top 5 *,Exp_Users.*,(SELECT COUNT (*)  from  Exp_Answers  WHERE  Exp_questions.QID = Exp_Answers.QID ) AS REC_COUNT from  (Exp_questions  left outer join Exp_Users on Exp_Questions.UserID=Exp_Users.UserID)  left outer join  Exp_Category on Exp_Category.CatID=Exp_Questions.CatID   where Exp_Questions.Status=1  order By Exp_Questions.Date_asked Desc" ,Conn,3,3
Reply With Quote
  #3 (permalink)  
Old February 2nd, 2006, 05:42 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , .
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks a lot.it worked

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
More than 1 Left Join in MS Access tovipul21 Access 5 November 21st, 2008 04:58 PM
left outer join keyvanjan Classic ASP Basics 1 April 15th, 2006 05:37 AM
left outer join keyvanjan Classic ASP Professional 0 February 5th, 2006 10:54 AM
left outer join 2 or 3 tables in ms access keyvanjan SQL Server ASP 0 January 30th, 2006 02:33 AM
Left Outer Join with Crystal navinkumar1 Crystal Reports 0 October 21st, 2004 01:02 PM



All times are GMT -4. The time now is 09:25 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.