Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am currently using access 2000 and this code doesnt seem to work :-
SQL
SELECT indents.pr_no, indents.issue_date, indentitems.quantity, indentitems.date_required, departments.department_code, departments.system_name, departments.subsystem_name, items.description, items.group, items.units
FROM (indentitems INNER JOIN [indents] ON indentitems.pr_no=indents.pr_no)
INNER JOIN departments ON indentitems.department_code=departments.department_code
INNER JOIN items on indentitems.item_code=items.item_code;


but if I remove the last line INNER JOIN items on indentitems.item_code=items.item_code and items.* in SELECT then it works I am really stuck.

Appreciate your help.
Posted
Updated 24-Feb-11 21:13pm
v2

1 solution

in access every join should be closed within brackets before using next put one more bracket as below

SELECT indents.pr_no, indents.issue_date, indentitems.quantity, indentitems.date_required, departments.department_code, departments.system_name, departments.subsystem_name, items.description, items.group, items.units
FROM ((indentitems INNER JOIN [indents] ON indentitems.pr_no=indents.pr_no)
INNER JOIN departments ON indentitems.department_code=departments.department_code)
INNER JOIN items on indentitems.item_code=items.item_code;


-Pankaj
 
Share this answer
 
Comments
execobra 25-Feb-11 3:24am    
thanks buddy, the nesting of join did work beautifully.... thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900