Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Madhav
Starting Member
38 Posts |
Posted - 2007-06-26 : 04:57:07
|
| dear forum members,i had a password feild column, the validations for password are... The password feild should be minimum of 6 in length. And should contain atleast one in each of the following: lowercase, uppercase, number(digit) or any special character.I m unable to vaidate all those, could anyone help me....? |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-26 : 05:07:27
|
| You have to do this in front end.--------------------------------------------------S.Ahamed |
 |
|
|
Madhav
Starting Member
38 Posts |
Posted - 2007-06-26 : 05:35:04
|
[quote]Originally posted by pbguy You have to do this in front end.--------------------------------------------------S.Ahamedmy front end guys asked me to do |
 |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-26 : 05:39:17
|
| Why do you want to do in back end. Password validation should be done at the front end.What is the use of doing at the backend.--------------------------------------------------S.Ahamed |
 |
|
|
Madhav
Starting Member
38 Posts |
Posted - 2007-06-26 : 05:55:17
|
[quote]Originally posted by pbguy Why do you want to do in back end. Password validation should be done at the front end.What is the use of doing at the backend.--------------------------------------------------S.Ahamedno ahmed, the front end guys are not validated. now they are trying to validate...Now they want to know hw many such invalid passwords are there in the password field column. |
 |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-26 : 07:01:19
|
| Hope this will give u some idea...declare @t varchar(10)Set @t = 'rAyf2@5'Select case when @t Collate Latin1_General_BIN like '%[A-Z]%' And -- to check for upper case Len(@t) > 6 and --len of the string @t like '%@%' -- special characters (ADD extra condition for different special character then 'Right Password' else 'Wrong Password' end--------------------------------------------------S.Ahamed |
 |
|
|
Madhav
Starting Member
38 Posts |
Posted - 2007-06-26 : 07:46:55
|
[quote]Originally posted by pbguy Hope this will give u some idea...declare @t varchar(10)Set @t = 'rAyf2@5'Select case when @t Collate Latin1_General_BIN like '%[A-Z]%' And -- to check for upper case Len(@t) > 6 and --len of the string @t like '%@%' -- special characters (ADD extra condition for different special character then 'Right Password' else 'Wrong Password' end--------------------------------------------------S.AhamedAhmed, is there any way apart from checking @t like '%#%' etc and i also when i am checking with %, like '%%%' it is showing wrong result.please give me any other solution |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-26 : 08:59:58
|
| use like '%[%]%'orcharindex('%',col)>0MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|