FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 25
→
WX - SQL e WL
WX - SQL e WL
Iniciado por adrianoboller, 21,may. 2015 15:38 - 1 respuesta
Conéctese…
adrianoboller
#1
Miembro registrado
3.661 mensajes
Popularité : +175 (223 votes)
Publicado el 21,mayo 2015 - 15:38
SQL
alter proc
[
dbo
]
.
NG0042_RandomSenha
AS
declare
@
MIN
TINYINT
SET
@
MIN
=
48
declare
@
range
TINYINT
SET
@
range
=
74
declare
@
qtde int
SET
@
qtde
=
4
declare
@
LEN
int
declare
@
inclui
VARCHAR
(
50
)
declare
@
output
VARCHAR
(
50
)
declare
@
char char
SET
@
output
=
''
SET
@
inclui
=
'abcdefghijklmnopqrstuvxyzw'
SET
@
LEN
= @
qtde
while
(
@
LEN
/
2
) >
0
begin
SELECT
@
char
=
char
(
ROUND
(
rand
(
) * @
range
+ @
MIN
,
0
)
)
IF
charindex
(
@
char
, @
inclui
) >
0
begin
SET
@
output
= @
output
+ @
char
SET
@
LEN
= @
LEN
-
1
END
END
SET
@
inclui
=
'0123456789'
SET
@
LEN
= @
qtde
while
(
@
LEN
/
2
) >
0
begin
SELECT
@
char
=
char
(
ROUND
(
rand
(
) * @
range
+ @
MIN
,
0
)
)
IF
charindex
(
@
char
, @
inclui
) >
0
begin
SET
@
output
= @
output
+ @
char
SET
@
LEN
= @
LEN
-
1
END
END
SELECT
LOWER
(
@
output
)
AS
Senha
;
go
--Exemplo
--exec NG0042_RandomSenha
--abc123
WL
SenhaRandomica is
string
=
Charact
(
Random
(
97
,
122
)
) +
Charact
(
Random
(
97
,
122
)
) +
Charact
(
Random
(
97
,
122
)
) +
Middle
(
Random
(
100
,
999
)
,
1
,
3
)
//abc123
Informar
0
0
adrianoboller
#2
Miembro registrado
3.661 mensajes
Popularité : +175 (223 votes)
Publicado el 21,mayo 2015 - 15:39
Informar
0
0
→ Volver a WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto