Ver Mensaje Individual
  #2  
Antiguo 16-09-2005
Avatar de Spynosa
Spynosa Spynosa is offline
Miembro
 
Registrado: nov 2004
Ubicación: Ecija - Sevilla
Posts: 99
Reputación: 20
Spynosa Va por buen camino
Código SQL [-]

for Select ENT_DET_ARTICULO, ENT_DET_CANTIDAD, ENT_DET_LARGO, ENT_DET_ANCHO from ENTALMACENDET
where ENT_DET_FOLIO = :FOLIO into roducto, :cantidad, ;Existencia, :Ancho :Largo do
begin

aux1 = '';
aux2 = '';

select MAT_ANCHO, MAT_LARGO from MATERIAL_DET where MAT_ID:=producto into :aux1, :aux2;

 if (aux1 = '' and aux2 = '') then
      insert into tabla (lo que sea)
    else
      update tabla (lo que sea)
Responder Con Cita