Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » Oracle »

alter table

Estas en el tema de alter table en el foro de Oracle en Foros del Web. Hola, necesito crear un script que haga un alter table, tengo esto pero me da error. sccj.sql -------- DECLARE V_TIPOSERV INTEGER; BEGIN ALTER TABLE DOCSADM.LOGJMO ...
  #1 (permalink)  
Antiguo 19/04/2007, 07:57
 
Fecha de Ingreso: abril-2007
Mensajes: 9
Antigüedad: 17 años
Puntos: 0
alter table

Hola,
necesito crear un script que haga un alter table, tengo esto pero me da error.
sccj.sql
--------
DECLARE
V_TIPOSERV INTEGER;
BEGIN
ALTER TABLE DOCSADM.LOGJMO ADD (NUM_EXPEDIENTE INTEGER);
END;

ERROR en línea 4:
ORA-06550: line 4, column 1:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "lock was inserted before "ALTER" to continue.
ORA-06550: line 4, column 32:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
, in
ORA-06550: line 5, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> form current cursor
  #2 (permalink)  
Antiguo 23/04/2007, 05:15
Avatar de Zoe79  
Fecha de Ingreso: diciembre-2001
Mensajes: 187
Antigüedad: 22 años, 4 meses
Puntos: 1
Re: alter table

Que yo sepa no puedes hacer un alter en un trigger.
__________________
Diseño integral / Desarrollo
Grupo Ikon
Imagen - Fotografía
Borja Lázaro Herrero
  #3 (permalink)  
Antiguo 25/04/2007, 22:25
Avatar de kikolice  
Fecha de Ingreso: marzo-2004
Mensajes: 1.510
Antigüedad: 20 años, 1 mes
Puntos: 7
Re: alter table

tal vez si lo intentas con algo asi te funcione

execute immediate('ALTER TABLE DOCSADM.LOGJMO ADD (NUM_EXPEDIENTE INTEGER');
__________________
Blogzote.com :-) Mi blog
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:30.