Answered
Query Issue...
Hey all, I am having an issue here and i was hoping that
somone could help.
I am trying to retrieve an outputted list of all results that don't equal eachother.
ie, I have two databases and i want to view what images are in one database that are not in the other database. Is there a way to do this?
This is what i am doing now:
<cfquery name="imagelist1" datasource="database1">
SELECT filename, imagename
FROM iod_product_images
</cfquery>
<cfquery name="imagelist2" datasource="database2">
SELECT filename, imagename
FROM iod_product_images
</cfquery>
<cfquery dbtype="query" name="final">
SELECT filename FROM imagelist1
WHERE imagelist1.filename = imagelist2.filename
</cfquery>
<cfoutput query="final">
<cfset count = '#count + 1#'>
</cfoutput>
<cfoutput>
#count#
</cfoutput>
I am trying to retrieve an outputted list of all results that don't equal eachother.
ie, I have two databases and i want to view what images are in one database that are not in the other database. Is there a way to do this?
This is what i am doing now:
<cfquery name="imagelist1" datasource="database1">
SELECT filename, imagename
FROM iod_product_images
</cfquery>
<cfquery name="imagelist2" datasource="database2">
SELECT filename, imagename
FROM iod_product_images
</cfquery>
<cfquery dbtype="query" name="final">
SELECT filename FROM imagelist1
WHERE imagelist1.filename = imagelist2.filename
</cfquery>
<cfoutput query="final">
<cfset count = '#count + 1#'>
</cfoutput>
<cfoutput>
#count#
</cfoutput>
