Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 11th, 2006, 03:57 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , .
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default left outer join

Hi,
I use MS ACCESS
The following query works when I user just 1 left outer join with parenthesis but with one than 1 left outer join I get syntax error
what should I do?
RS1.Open "select *,exp_questions.userid,(SELECT COUNT (*) from Exp_Answers WHERE Exp_questions.ID = 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 left outer join Exp_SUBCategory on Exp_SubCategory.SubID=Exp_Questions.SubID left outer join Exp_Answers on Exp_Answers.QID=Exp_Questions.ID where Exp_Questions.QID=" & intQID ,Conn,3,3

  #2 (permalink)  
Old April 15th, 2006, 05:37 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii keyvanjan!!
 use parentheses to solve it
as per for my logintable

SELECT logintable.id, logintable.code, *
FROM ((logintable LEFT outer JOIN logintable AS logintable_1 ON logintable.id = logintable_1.id) LEFT outer JOIN logintable AS logintable_2 ON logintable_1.id = logintable_2.id) LEFT outer JOIN logintable AS logintable_3 ON logintable_2.id = logintable_3.id;

to sort out your query you can also use query in design view and check it

Hope this will help you

Cheers :)

vinod


Similar Threads
Thread Thread Starter Forum Replies Last Post
LEFT vs LEFT OUTER joxa83 SQL Server 2005 3 September 18th, 2008 03:13 AM
left outer join keyvanjan Classic ASP Professional 0 February 5th, 2006 11:54 AM
left outer join 2 or 3 tables in ms access keyvanjan Classic ASP Basics 2 February 2nd, 2006 06:42 PM
left outer join 2 or 3 tables in ms access keyvanjan SQL Server ASP 0 January 30th, 2006 03:33 AM
Left Outer Join with Crystal navinkumar1 Crystal Reports 0 October 21st, 2004 01:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.