Wouldnt you put an IF at the begining of the statement?
<cfquery name="insert_photo" datasource="c21ar">
IF NOT EXISTS (SELECT PHOTO_FILENAME
FROM HMLS_PHOTOS
WHERE PHOTO_FILENAME = <cfqueryparam
cfsqltype="cf_sql_varchar" value="#photolist.name#">)
INSERT INTO HMLS_PHOTOS
(PHOTO_FILENAME,
PHOTO_MLS_NUMBER)
VALUES (<cfqueryparam cfsqltype="cf_sql_varchar" value="#
photolist.name#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#listfirst(
photolist.name,'_')#">)
</cfquery>
--
--
Richard Dillman
[EMAIL PROTECTED]
"There are painters who transform the sun to a yellow spot, but there are
others who with the help of their art and their intelligence, transform a
yellow spot into the sun."
- Pablo Picasso
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305464
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4