
June 21st, 2005, 01:40 PM
|
|
Contributing User
|
|
Join Date: Jan 2005
Posts: 33
Time spent in forums: 17 h 36 m 52 sec
Reputation Power: 4
|
|
Perhaps this will work? There are other ways, but this one aint too bad ...
Code:
<cfset similarValues = ArrayNew(1)>
<cfquery name="checkForDupes" datasource="Rents">
Select * from Rents where Lessor Like '%#LessorBroken#%' AND Address Like '%#AddressBroken#%'
</cfquery>
<cfloop query="checkForDupes">
<cfset ArrayAppend(similarValues,"#id# #Lessor# #Address#")>
</cfloop>
Quote: | Originally Posted by mparker1113 Hello,
I am doing a search for existing database records which might be a duplicate record (ie Sue Jones repeated as Susan Jones).
I am using a SQL Like statement to find similar records to my input form. I would like to store the potentially similar records in an array so that I can verify that I do not have duplicates of my potential duplicates.
How can I fill an array with values that I get from a query?
I have tried the following, but it doesn't work.
Thanks, you guys are great.!
Code:
<cfquery name="checkForDupes" datasource="Rents">
Select * from Rents where Lessor Like '%#LessorBroken#%' AND Address Like '%#AddressBroken#%'
</cfquery>
<cfoutput query="checkForDupes">
similar_values[#valuIndex#] = #id# #Lessor# #Address#
#valuIndex# = #valuIndex# + 1
<!--- WE Matched #LessorBroken# / #AddressBroken# at: #id#, #Lessor# <br> --->
</cfoutput>
|
|