Skip to content
Advertisement

Execution from the statement select * into return error

Can somebody help me?

I am try execute the command below in Oracle 11 and I get this error:

SQL Error [905] [42000]: ORA-00905: keyword not found.

Code:

SELECT * 
INTO SAJ.ETMP_TESTE 
FROM SAJ.ESAJOBJETO O 
WHERE CDOBJETO = 'P800000000J03'

I read the Oracle docs and haven’t found any obvious error in my statement.

https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/selectinto_statement.htm

My objective is to create the table ETMP_TESTE with structure from ESAJOBJETO.

I checked user permission and user has permission to action.

Advertisement

Answer

You need create table and not select into for create a table based on the result of a query

CREATE TABLE SAJ.ETMP_TESTE 
AS   SELECT *  
FROM SAJ.ESAJOBJETO O 
WHERE CDOBJETO = 'P800000000J03'
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement