This does not look like PL/SQL to me. What computer language are you trying
to use?

On Thu, Feb 12, 2015 at 7:34 AM, Ion Dijkstra <
ion.zu...@alumni.mondragon.edu> wrote:

> Hello,
>
> I'm doing a program in which you have to upgrade a users password. This
> password will need to contain enlist one number among other conditions I've
> already done. However I can't get to it.
>
> "password" is the one to contain a number on it. Here goes my program:
>
>
>
> delimiter //
>
>   drop function if exists login;
>
> Create Function login (nombreusuario varchar(20), password varchar (10),
> repite varchar (10), vieja varchar (10))
>
> Returns boolean no SQL
>
> begin
>       /* Comparar los valores nombre y password con los reales */
>        declare comparacion varchar(30);
>    declare compa varchar(30);
>    set comparacion = (SELECT nombre
>                       FROM usuarios
>                       WHERE (nombre = nombreusuario)) ;
>        set compa = (SELECT contrasena
>   FROM usuarios
>                       WHERE (nombre = nombreusuario));
>
>      if (comparacion = nombreusuario) and (compa = vieja) and
> length(password)>=6 and (password = repite) then
>
>     /* Hacer el UPDATE  */
>         UPDATE usuarios
> SET contrasena = password
> WHERE nombre = nombreusuario;
>         /*Como es verdadero devuelve verdadero */
>         Return TRUE;
>      else
>         Return FALSE ;
>      end if;
> end
> //
>
> delimiter ;
>
>
>
> ¿What should I add to the program?
>
> My thanks.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Oracle PL/SQL" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to oracle-plsql+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Oracle PL/SQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to oracle-plsql+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to