开发者

HashBytes works on sql server 2000?

开发者 https://www.devze.com 2023-03-25 16:53 出处:网络
i have a client that runs a windows ap开发者_运维百科plication on a sql server 2000 database, and i am trying to run a query that works fine on sql server 2005, with the HashBytes function like this:

i have a client that runs a windows ap开发者_运维百科plication on a sql server 2000 database, and i am trying to run a query that works fine on sql server 2005, with the HashBytes function like this:

SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5','some text'), 3, 32) AS MD5

but i don't know if this function works on sql server 2000, so i don't want to send to him something that may not work. So, can you tell me if this is going to work on my client? If not.. what alternatives i have to save that 'some text' in md5 format?

Thanks!


HASHBYTES was introduced in SQL 2005, for 2000 you would need an extended stored procedure, for example: http://www.codeproject.com/KB/database/xp_md5.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号