ColdFusion md5 hash directy in MSSQL

by 4:21 AM 4 comments
Ever needed to compare a ColdFusion hash() directly in MS SQL? I did today and I knew I had accomplished this before but forgot how to do it. Searching the net and twitter I came to some dead end or longish solutions. I knew Steve Good and I worked this out once before but I also remember there being an easier way.

Well there is and here is where I took the solution from: http://orangepips.instantspot.com/blog/Database

The funny thing is I found this nearly a year ago and actually commented on the post just forgot all about it.





The result:

4 comments:

  1. So given that CF has the ability to create a hash effortlessly, what would be a real world scenario where you would want SQL server doing the hashing?

    ReplyDelete
  2. I had a series of string in a table. To gain a little extra performance on selects I have a hash of each string with an index. I needed to get the hash of a string directly in enterprise manger to confirm some entries.

    ReplyDelete
  3. Another good use case would be if you wanted to eliminate duplicates in a query. Pass in a CF hash to the where statement

    ReplyDelete
  4. I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again..

    I really enjoy reading this article. Hope that you would do great in upcoming time. A perfect post.
    abcya | royal oil 365

    ReplyDelete