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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 please solv this query...

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
Go to Top of Page

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.Ahamed

my front end guys asked me to do
Go to Top of Page

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
Go to Top of Page

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.Ahamed

no 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.
Go to Top of Page

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
Go to Top of Page

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.Ahamed

Ahmed, 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
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-26 : 08:59:58
use like '%[%]%'
or
charindex('%',col)>0

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -