i want to create a temporary table on the fly from a result set so that i can run some queries against this resultset.
Here is my sql:
CREATE TABLE temp_table_1 AS (SELECT * FROM A LEFT OUTER JOIN B ON A.id = B.id WHERE B.id IS null);
SELECT QUA.id, QUA.name, QUA.address, QUA.acc, QUA.module, QUA.tag
FROM QUA,temp_table_1
WHERE
QUA.name = temp_table_1.name AND
QUA.acc = temp_table_1.acc AND
QUA.tag = temp_table_1.tag
When i run the first query to create the temp table, I get the error message:
'Duplicate Colum Name 'id''
Thanks a lot for your help.