0

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?

1 Answer 1

3

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

select .... INTO Query_table FROM ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.