Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Help! New guy using BOM structured data base


Message #1 by "Waiman" <waiman69@h...> on Wed, 29 May 2002 10:47:50
Hi every one

I am currently building a BOM structured database and I read the article 
from Geoff Pennington and I got the following SQL statement

SELECT * 
FROM ent a
JOIN junction j  ON j.first_ent_id     = a.ent_id
JOIN ent b       ON j.second_ent_id    = b.ent_id
WHERE a.ent_id = @parameter

However, when I typed it in MS access, it didn't work, so I made some 
change on the code

SELECT * 
FROM ent a
INNER JOIN junction 
(j  INNER JOIN ent b ON j.second_ent_id    = b.ent_id)
ON j.first_ent_id     = a.ent_id
WHERE a.ent_id = @parameter

However, the outcome is not I expected. 

Could anyone please tell me what is going on?

Thankyou very very Much!!!
Wolf
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 30 May 2002 15:31:36 +1000
Could you elaborate on
a) Geoff Penington's article (eg post it so that we can go and read it as
well)
b) What you mean when you say "the results are not what I expected"

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Waiman" <waiman69@h...>
Subject: [access_asp] Help! New guy using BOM structured data base


: Hi every one
:
: I am currently building a BOM structured database and I read the article
: from Geoff Pennington and I got the following SQL statement
:
: SELECT *
: FROM ent a
: JOIN junction j  ON j.first_ent_id     = a.ent_id
: JOIN ent b       ON j.second_ent_id    = b.ent_id
: WHERE a.ent_id = @parameter
:
: However, when I typed it in MS access, it didn't work, so I made some
: change on the code
:
: SELECT *
: FROM ent a
: INNER JOIN junction
: (j  INNER JOIN ent b ON j.second_ent_id    = b.ent_id)
: ON j.first_ent_id     = a.ent_id
: WHERE a.ent_id = @parameter
:
: However, the outcome is not I expected.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  Return to Index