Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 14291

CF Hash and SQL Server

$
0
0


Hi,

 

Basically,  I receive a hash of a pk and would like to compare that hash value a pk in SQL Server.  There is no stored hash value in that table.  So I have to use CF function Compare to compare while looping the whole table.  As a result, it's slow down.  Is there any functions in SQL server or something that I can get a quicker comparison result?

 

Here is basically the loop of the table and comparing.

<cfquery name="name">

     SELECT id

     FROM tbl

</cfquery>

<cfloop query="name">

     <cfset hashID = HASH(name.id,"SHA")>

     <cfif COMPARE(url.id,hashID) EQ 0>

          [do something]

     </cfif>

</cfloop>


Viewing all articles
Browse latest Browse all 14291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>