In the question you said that the error refers to STATUS, but that doesn't match your posted code You shoudl be getting two errors referring to JOB_STATUS.
That's because it's defined as a local variable, and you're trying to refer to it as a bind variable. It should not have the colon prefix; so this compiles:
create or replace trigger resume_trgr
before update on temp_jobs
declare
job_status temp_jobs.status%type;
begin
select STATUS into job_status from temp_jobs where id=6120;
if job_status='E'
then
update temp_jobs set STATUS='R' where id=6120;
end if;
end;
/
as does this, which skips the variable completely:
create or replace trigger resume_trgr
before update on temp_jobs
begin
update temp_jobs set STATUS='R' where id=6120 and status = 'E';
end;
/
Whether that's a useful, valid or sensible thing to be doing inside a trigger is another matter. It seems like a separate update you should be doing manually before your 'real' update, possibly in a procedure - if you really want to always update the row for that specific ID regardless of whatever else you are actually doing in your 'real' (triggering) update.
If what you are really trying to do is make sure the status changes to R even if the caller doesn't explicitly do that, then you probably want a row-level trigger that sets the pseudorow value, rather than a statement-level trigger with a hard-coded ID.
job_statusis a local variable not a bind variable, so that should not have have a colon prefix. But it's not clear what you are really doing or seeing...