I have a sql script that is attempting to clean up my database after I run a test. I have some foreign key constraints that I need to work around.
I need to capture an id (addmasId) from table channel,
then delete the row from channel
then delete a row from table address using the variable I set to capture addmasId.
Here is an example of what I attempted to do:
select @addmas1 = addmasId from address where addmasId in (select addmasId from channel where chamasId = &channelId);
delete from channel where chamasId = &channelId;
delete from address where addmasId = @addmas1;
I am getting the following error:
SQL Error: ORA-00936: missing expression
00936. 00000 - "missing expression"