I need to create a new password in TSQL which needs to be 8 characters (a-z) which have to include upper and lower characters as well as at least one number.
Can anyone help me with this?
select cast((Abs(Checksum(NewId()))%10) as varchar(1)) +
char(ascii('a')+(Abs(Checksum(NewId()))%25)) +
char(ascii('A')+(Abs(Checksum(NewId()))%25)) +
left(newid(),5)
from yourTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With