Home » RDBMS Server » Security » mixing letters and numbers in passwords
mixing letters and numbers in passwords [message #7796] Wed, 09 July 2003 12:01 Go to next message
Keith
Messages: 88
Registered: March 2000
Member
How can I create a check to ensure that passwords contain both letters and numbers please.

Ideally, they should be able to enter both
Re: mixing letters and numbers in passwords [message #7801 is a reply to message #7796] Wed, 09 July 2003 12:55 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
sql>select * from t;
 
PASSWORD
------------------------------
ABCDEF
123456
ABC123
123ABC
 
4 rows selected.
 
sql>select password
  2    from t
  3   where not (   length(password) = length(replace(translate(password, '0123456789', '0'), '0'))
  4              or lower(password) = upper(password));
 
PASSWORD
------------------------------
ABC123
123ABC
 
2 rows selected.
 
sql>select password
  2    from t
  3   where (   length(password) = length(replace(translate(password, '0123456789', '0'), '0'))
  4          or lower(password) = upper(password));
 
PASSWORD
------------------------------
ABCDEF
123456
 
2 rows selected.
Re: mixing letters and numbers in passwords [message #7808 is a reply to message #7801] Thu, 10 July 2003 00:50 Go to previous message
Keith
Messages: 88
Registered: March 2000
Member
Thank you Todd.

This is of great help

(Buys Todd a Beer)
Previous Topic: diff. between sys and system user
Next Topic: password checking in Forms
Goto Forum:
  


Current Time: Thu Mar 28 20:11:08 CDT 2024