This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author : SOMENDRA PRATAP SINGH | |
select isnull(item, 0), * from service.split1('', ' ', null) | |
select * from service.split1('ram sham mohan rohan', ' ', null) | |
select * from split1('ram:23 sham mohan rohan:20', ' ', ':') where item1=23 | |
select * from split2('a@b@c,d@e@,zxcfdsdgdsgsd',',','@','@') | |
select substring('a-b@c,d-e@f',1,(charindex(',','a-b@c,d-e@f',0)-1)) | |
select substring( substring('a-b@c,d-e@f',1,(charindex(',','a-b@c,d-e@f',0)-1)) ,1,(charindex('-', substring('a-b@c,d-e@f',1,(charindex(',','a-b@c,d-e@f',0)-1)) ,0)-1)) | |
select right(substring('a-b@c,d-e@f',1,(charindex(',','a-b@c,d-e@f',0)-1)),len(substring('a-b@c,d-e@f',1,(charindex(',','a-b@c,d-e@f',0)-1)))-(len('a')+1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------ | |
CREATED BY : SOMENDRA PRATAP SINGH | |
Date : 12 JUN 2013 | |
PURPOSE : split deLimited text into rows / columns | |
select isnull(item, 0), * from Service.split1('', ' ', null) | |
select * from Service.split1('ram sham mohan rohan', ' ', null) | |
select * from dbo.split1('ram:23 sham:15 mohan:28 rohan:20', ' ', ':') | |
------------------------------------------------------------------ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------ | |
CREATED BY : SOMENDRA PRATAP SINGH | |
PURPOSE : Generate random password | |
SELECT RandomPassword from generateRandomPassword | |
------------------------------------------------------------------ | |
*/ | |
CREATE VIEW generateRandomPassword | |
AS | |
SELECT CHAR((RAND() * 25) + 97) + CHAR((RAND() * 25) + 97) + CHAR((RAND() * 25) + 97) + CAST(CAST((RAND()*9999) AS INT) AS VARCHAR(4)) as RandomPassword; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------ | |
CREATED BY : SOMENDRA PRATAP SINGH | |
PURPOSE : Generate random password | |
SELECT RandomPassword from generateRandomPassword | |
------------------------------------------------------------------ | |
*/ | |
CREATE VIEW generateRandomPassword | |
AS | |
SELECT CHAR((RAND() * 25) + 97) + CHAR((RAND() * 25) + 97) + CHAR((RAND() * 25) + 97) + CAST(CAST((RAND()*9999) AS INT) AS VARCHAR(4)) as RandomPassword; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------- | |
CREATED BY : Somendra Pratap Singh | |
PURPOSE : Encrypt password | |
select dbo.EncryptPassword('STR112') | |
select * from SRVUserLogin where logname = 'STR112' | |
select * from SRVPasswordPolicy where employeeid = '2964' | |
------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visual Studio 2019 Enterprise | |
BF8Y8-GN2QH-T84XB-QVY3B-RC4DF | |
Visual Studio 2019 Professional | |
NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y |