Skip to content
Advertisement

Query issue using Access 2007

My query looks like this :

SELECT parent2.subid AS parent2id, parent2.sub AS parent2desc,
key.subid AS ID, parent1.subid AS parentid, 
parent1.sub AS parentdesc, key.sub AS key 
FROM (table1 AS key LEFT JOIN table1 AS parent1 ON key.parent_id=parent1.subid)
LEFT JOIN table1 AS parent2 
ON parent1.parent_id=parent2.subid into Query_table

This query when run on the dB without the into Query_table works fine, but I want to create the table dynamically and perform some operations.

In the above query I get the following error:

“Syntax error (missing operator) in query expression ‘parent1.parent_id=parent2.subid into Query_tabl'”

Any idea why?

Advertisement

Answer

The INTO clause comes between the select list and the FROM clause. I.e.

select .... INTO Query_table FROM ...
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement