Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

MD5

By Caesar2,

Just pass a string to 'encrypt' and an int specifying the long of the result string (max: 32).

I need to aply a substring to extrac the 'hex' part (0x).

for example:
select dbo.fn_MD5('hello', 32) as md5, returns: '5d41402abc4b2a76b9719d911017c592'
select dbo.fn_MD5('hello', 31) as md5, returns: '5d41402abc4b2a76b9719d911017c59'
select dbo.fn_MD5('hello', 30) as md5, returns: '5d41402abc4b2a76b9719d911017c5'

Total article views: 1080 | Views in the last 30 days: 3
 
Related Articles
FORUM

Select statement of view stays 5 hours to return results......

Select statement of view stays 5 hours to return results......

FORUM

Removing Carriage Returns in a Select Statement

Having trouble removing carriage returns within a select statement on a ntext field

BLOG

MDX #23 – “Hello World!” Lesson in MDX

Almost every tool we learned has some sort of “Hello World!” tutorial lesson. So here comes the “He...

FORUM

RiskIdShortName IN (select * from dbo.fn_ParseString2(@P_RISKID,','))

I have trouble with Multi-value parameter. [code="sql"]WHERE F.RiskIdShortName IN ('CAD,CAD+CSW,E...

FORUM

how to return th Flag 1 to raise the alert or 0 to no alert from SELECT statement??

how to return th Flag 1 to raise the aleart or 0 to no alert from SELECT statement??

 
Contribute