Ver Mensaje Individual
  #4  
Antiguo 30-09-2008
Gabichu Gabichu is offline
Miembro
 
Registrado: jul 2008
Posts: 10
Reputación: 0
Gabichu Va por buen camino
Gracias!!! Me causa gracia pensar que perdi tanto tiempo probando tantas cosas y el problema era tan sencillo de solucionar..

Aca esta el procedimiento y funciona correctamente!!!!

Código SQL [-]
begin
  /*Insertar fecha, cod_cliente, cliente, cod_presupuesto */
  select count(pendientes.cod_presup) from pendientes where pendientes.cod_presup=:cod_presup into :cantidad;
  if (:cantidad=0 or (:cantidad is NULL) ) then
  begin
       for
         select presupuestos.cod_presup, presupuestos.cod_cliente,clientes.nombre||' '||clientes.apellido AS CLIENTE,fecha
             from presupuestos, CLIENTES
                where presupuestos.cod_presup=:cod_presup AND PRESUPUESTOS.cod_cliente=CLIENTES.cod_cliente into :CODpresup, :codcliente, :cliente,:fecha
       do
       begin
            insert into pendientes(cod_cliente,FECHA_AT,cliente,cod_presup) values(:codcliente,:fecha, :cliente,:codpresup);
        end
    end

end

Última edición por Gabichu fecha: 30-09-2008 a las 18:52:33. Razón: error de sintaxis
Responder Con Cita