Yep, no problem:
I created the usual insert sql statement to insert all of the updated rows back into the DB.
Next i created a dupcheck select statement which basically is a select statement which checks for dups onitself:
<cfquery name="qryCheckOperationNameDups" datasource="UKCHAPP145">
SELECT DISTINCT
a.OPERATION_UUID
FROM
UKCHAPP145.TBL_OPERATION a,
UKCHAPP145.TBL_OPERATION b
WHERE
a.HEADER_UUID = <cfqueryparam value="#arguments.HEADER_UUID#" cfsqltype="cf_sql_integer">
AND
b.HEADER_UUID = <cfqueryparam value="#arguments.HEADER_UUID#" cfsqltype="cf_sql_integer">
AND
a.OPERATION_UUID > b.OPERATION_UUID
AND
a.OPERATION_NAME = b.OPERATION_NAME
AND
a.DELETE_FLAG = <cfqueryparam value="N" cfsqltype="cf_sql_varchar">
AND
b.DELETE_FLAG = <cfqueryparam value="N" cfsqltype="cf_sql_varchar">
ORDER BY
a.OPERATION_UUID
</cfquery>
Then used an if statement to run a condition to see if any rows were returned, if they were then return back to the user an error plus do a transaction rollback.
It works very well.
I found the dup select statement idea on a blog and modified the code to suit my application.
cheers
JM