Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > Oracle
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 23-06-2004
febito febito is offline
Miembro
 
Registrado: dic 2003
Posts: 28
Poder: 0
febito Va por buen camino
Error en sentencia delete

estoy trabajnado con oracle 9i
la siguiente sentencia delete al ejecutrala devuelve 'comando sql no terminado correctamente'

DELETE TableOwner.ATRI
FROM TableOwner.ATRI A, TableOwner.GRUPO G, TableOwner.DE_GRU DG, TableOwner.LISTA_GRU_MUE LGM
WHERE A.IDGRU=G.IDGRU AND G.IDGRU=LGM.IDGRU AND LGM.IDMUE= :IDMUE AND DG.IDDEGRU=G.IDDEGRU AND DG.GLOBAL='N'

que error de sintaxis estoy cometiendo. Gracias
Responder Con Cita
  #2  
Antiguo 23-06-2004
Avatar de delphi.com.ar
delphi.com.ar delphi.com.ar is offline
Federico Firenze
 
Registrado: may 2003
Ubicación: Buenos Aires, Argentina *
Posts: 5.932
Poder: 27
delphi.com.ar Va por buen camino
Sencillamente esta mal escrita. Las tres funciones DDL básicas (INSERT, DELETE y UPDATE), pueden apuntar solo a una tabla por vez. Si puedes en el where hacer referencia a otras tablas
Código SQL [-]
DELETE FROM TableOwner.ATRI 
WHERE EXISTS (SELECT 1 FROM TableOwner.GRUPO G, TableOwner.DE_GRU DG, TableOwner.LISTA_GRU_MUE LGM 
WHEREA.IDGRU=G.IDGRU AND G.IDGRU=LGM.IDGRU AND LGM.IDMUE= :IDMUE AND DG.IDDEGRU=G.IDDEGRU AND DG.GLOBAL='N')

Saludos!
__________________
delphi.com.ar

Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla.
Responder Con Cita
  #3  
Antiguo 25-06-2004
febito febito is offline
Miembro
 
Registrado: dic 2003
Posts: 28
Poder: 0
febito Va por buen camino
Funciono bien, Muchas gracias
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 20:31:38.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi