delete records question
Hi All,
How can I delete records from a table base on a query result?
<cfquery name="newRecords" datasource="#my_str_dsn#">
select *
from TableA
where myKey_id= #arguments.key_id#
</cfquery>
<cfquery name="deleteRecords" datasource="#my_str_dsn#">
delete from TableB
where myKey_id in (select myKey_id from newRecords)
</cfquery>
I know i can do this in one statement but I am converting array items into the query result first and then i want to delete those from a table.
Thanks
Johnny
