Hey guys,
I've got a nice one for you this time.
I'm programming a recipe application at the moment to create recipes for factory product.
My database is in short like this :
- table "Recipe" that holds the recipe number(autonumber), code ("PC123") and name ("Pancake")
- table "TT_Recipe_Component" that holds the Recipe_NUMBER(Foreign key to Recipe), Component_NUMBER(Foreign key to Component) and Percentage("15") of component.
- table Components that holds Component_NUMBER, Description ("Butter")
I use ADODB to connect to the database.
The Source :
AND
Both work!
So I tried using the source :
This gives me a Syntax Error :
Run-time error '-2147217900 (80040e14)':
Syntax error(missing operator) in query expression :
Component.NUMBER = TT_Recipe_Component.Component_NUMBER
LEFT JOIN Recipe ON Recipe.NUMBER =
TT_Recipe_Component.Recipe_NUMBER
Have you got any idea how I can combine the three tables?
Thanx in advance
Linux IS userfriendly.
It's only very selective about who it's friends are.
I've got a nice one for you this time.
I'm programming a recipe application at the moment to create recipes for factory product.
My database is in short like this :
- table "Recipe" that holds the recipe number(autonumber), code ("PC123") and name ("Pancake")
- table "TT_Recipe_Component" that holds the Recipe_NUMBER(Foreign key to Recipe), Component_NUMBER(Foreign key to Component) and Percentage("15") of component.
- table Components that holds Component_NUMBER, Description ("Butter")
I use ADODB to connect to the database.
The Source :
Code:
SELECT * FROM Component
LEFT JOIN TT_Recipe_Component ON (Component.NUMBER = TT_Recipe_Component.NUMBER)
Code:
SELECT * FROM Component
LEFT JOIN Recipe ON (TT_Recipe_Component.NUMBER = Recipe.NUMBER)
So I tried using the source :
Code:
SELECT * FROM Component
LEFT JOIN TT_Recipe_Component ON (Component.NUMBER = TT_Recipe_Component.NUMBER)
LEFT JOIN Recipe ON (TT_Recipe_Component.NUMBER = Recipe.NUMBER)
This gives me a Syntax Error :
Run-time error '-2147217900 (80040e14)':
Syntax error(missing operator) in query expression :
Component.NUMBER = TT_Recipe_Component.Component_NUMBER
LEFT JOIN Recipe ON Recipe.NUMBER =
TT_Recipe_Component.Recipe_NUMBER
Have you got any idea how I can combine the three tables?
Thanx in advance
Linux IS userfriendly.
It's only very selective about who it's friends are.