Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Databases > MySQL   »   INNER JOIN

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Mar 7, 2003, 07:02 AM
mastech
New Member
mastech is offline
 
Join Date: Feb 2003
Location: London
Posts: 1
mastech See this member's comment history on his/her Profile page.
Send a message via ICQ to mastech
INNER JOIN

???Please could someone assist :  ???

I wish to link three tables with the INNER JOIN.

table 1 - orders primary file Key - OrderID

table 2 - order details - OrderID ProductID
from order details I get ProductID
table 3 - products ProductID

I am using the below suntax :

singleorderSQL=

select * FROM Orders INNER JOIN
(OrderDetails INNER JOIN Products ON
(Prodcts.ProductID = OrderDetails.ProductID) ON
(Orders.OrderID = OrderDetails.OrderID)
where OrderDetails.orderid="&orderid&" and not processed"

singleorder.open singleordersql,MM_SpaceTwo_STRING

When I run and attempt to access Products("DESCRIPTION") by referencing <%= Singleorder("DESCRIPTION") %> in my asp page I get the below error :


Microsoft VBScript runtime error '800a01a8'
Object required: ''

/spaceman/Spaceman_new/SpaceAdmin/view_new_orders.asp, line 253


All the information is correctly in the data base so suspect i have a syntax issue to deal with but cant for the life of me sort it.

Hope fully some fresh eyes will solve.

cheers
steve

Reply With Quote
 
     

Answers
 
 
Old Apr 4, 2003, 04:05 PM   #2  
hswes
New Member
hswes is offline
 
Join Date: Apr 2003
Location:
Posts: 4
hswes See this member's comment history on his/her Profile page.
Send a message via ICQ to hswes
Re: INNER JOIN

You must write
select Orders.*, Products.* FROM Orders INNER JOIN
(OrderDetails INNER JOIN Products ON
(Prodcts.ProductID = OrderDetails.ProductID) ON
(Orders.OrderID = OrderDetails.OrderID)
where OrderDetails.orderid="&orderid&" and not processed"
Otherwise you get only the items from the Orders Table

Good luck

hswes
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
if you play runescape and want to join a clan click here ??? Games 70 Feb 6, 2008 04:04 AM
Leaking pipe - at join gvb Plumbing 1 Aug 30, 2006 03:46 AM
How to join two 3-way switches ru4him Electrical & Lighting 3 Aug 17, 2006 12:16 PM
join pvc drain into middle of existing cast iron dandax Plumbing 3 Aug 16, 2006 06:41 AM
Join 4" PVC to Cast Iron Hub stew_1962 Plumbing 2 Jan 25, 2006 02:34 PM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 10:11 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.