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:

Paul Kukiel

Developer

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

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. My husband is a programmer and I want to show him to understand the main thing here proof-reading.services writing scholarship
    like your site.

    ReplyDelete