Yes, but this is resolved.
I was looping through the same array twice which took a very long time. Instead
I used the original query object and while looping the array did a query of
query to check duplicates - if (recordcount gt 1){delete}.
<cfloop to="#ArrayLen(xlsrry)#" from="1" index="i">
<cfif i lte ArrayLen(xlsrry)>
<cfquery name="chkdups" dbtype="query">
select count(column#cmpy#) as temp from objSheet.Query where
column#cmpy# = '#xlsrry[i][cmpy]#'
</cfquery>
<!--- if there are duplicates, remove them --->
<cfif chkdups.temp gt 1>
<cfloop from="#ArrayLen(xlsrry)#" to="1" step="-1"
index="x">
<cfif x neq i and xlsrry[i][cmpy] eq xlsrry[x][cmpy]>
<cfset arrayDeleteAt(xlsrry,x)>
</cfif>
</cfloop>
</cfif>
</cfif>
</cfloop>
If anyone has a script equivalent, that would be cool. I couldn't figure out
how to do it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325222
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4