开发者

Query issue using Access 2007

开发者 https://www.devze.com 2023-02-24 00:58 出处:网络
My query looks like this : SELECT parent2.subid AS parent2id, parent2.s开发者_JS百科ub AS parent2desc,

My query looks like this :

SELECT parent2.subid AS parent2id, parent2.s开发者_JS百科ub 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?


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

select .... INTO Query_table FROM ...
0

精彩评论

暂无评论...
验证码 换一张
取 消