Hi all,
I'm running into this error when I try to run some queries inside SQLExecutor.
Select * into * not allowed in sql executor
is there any other way around?
Thanks.
Hi all,
I'm running into this error when I try to run some queries inside SQLExecutor.
Select * into * not allowed in sql executor
is there any other way around?
Thanks.
Select * into .. is PL/SQL code.
If you want to select multiple attributes, use:
Select * From <table>
And define the attributes to expose in the parameter.
Hope this helps.
Thanks for your response but that was not my point. Apologize for not making myself clear.
I have the "From <table>" there but the error's coming from not allowing my "Into <table>" part,
i.e. select A.cola, A.colb, B.cola, B.colB into new_table_c from A, B where A.id=B.id;
Do you mean:
Insert * from <table> into <new table> ?
This will insert records from the table into a new table.
Do you mean:
Insert * from <table> into <new table> ?
This will insert records from the table into a new table.
no, I meant: select attr1, attr2,... into table_c from tablea, tableb where tablea.id=tableb.id;
no, I meant: select attr1, attr2,... into table_c from tablea, tableb where tablea.id=tableb.id;
Insert into table_c
select tablea.attr1, tableb.attr2, ..
from tablea, tableb
where tablea.id = tableb.id
Tip: Since the SQLExecutor doesn't have a syntax (the statements are simply forwarded to the server), it's usually very helpful to tell us which database backend you're working with.
I fixed this issue by changing my query from:
select A.col1, A.col2, B.col1, B.col2 into new_table_name from A, B where A.id = B.id;
to
Create table new_table_name as
select A.col1, A.col2, B.col1, B.col2 from A, B where A.id = B.id;