Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Conexión con bases de datos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Conexión con bases de datos

 
 
Herramientas Buscar en Tema Desplegado
  #12  
Antiguo 24-02-2011
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.669
Poder: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
Prueba esto:

Código SQL [-]
CREATE OR ALTER PROCEDURE NEW_PROCEDURE2 (in_random decimal(12,0))
returns (out_random decimal(12,0))
as
  declare variable aux_rand decimal(12,0);
  declare variable aux_true integer;
begin
  AUX_TRUE  = 0;
 
  while (:AUX_TRUE = 0) do
  begin

    aux_rand = null;   /*   <------------------------------- */

    Select RANDOMNO from PRUEBA
      where RANDOMNO = :IN_RANDOM
      rows 1 into AUX_RAND;

    if (:AUX_RAND is null) then
    begin
      Leave;
    end
    else
    begin
      IN_RANDOM = :IN_RANDOM + 1;
      if (:IN_RANDOM > 200) then
        Leave;
    end

  end
 
  OUT_RANDOM = IN_RANDOM;
 
  suspend;
 
end
Responder Con Cita
 



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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Stored Procedure !!! Ledian_Fdez C++ Builder 0 02-03-2010 14:01:29
Stored Procedure StartKill MySQL 2 27-08-2008 06:18:44
Ver los Stored Procedure tgsistemas SQL 0 06-04-2004 17:18:22
Stored Procedure tgsistemas SQL 1 27-02-2004 13:10:33
problema con stored procedure Markoz Firebird e Interbase 8 27-06-2003 13:46:31


La franja horaria es GMT +2. Ahora son las 13:46:47.


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