SQL Language (MOSC)

MOSC Banner

ORA-01027 when try to create table

edited Dec 6, 2017 12:22PM in SQL Language (MOSC) 2 commentsAnswered ✓

Hello guys,

anyone may help,when I run code below :

variable anomes number;

BEGIN

select  admindb.fc_calcula_ano_mes (XXX) into :anomes FROM cadastro.sistema_parametros;

END;

/  

DEFINE anomesfat=:anomes;

select * FROM test where a=&anomesfat;

Result  is OK

But when :

variable anomesfat number;

BEGIN

select  admindb.fc_calcula_ano_mes (PARM_AMREFERENCIAFATURAMENTO) into :anomesfat FROM cadastro.sistema_parametros;

END;

/

I got this error:

create table teste1 as

select * FROM teste where a=&anomesfat;

ora-01027 bind variables not allowed for data definition

How can pass this problem?

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center