user3787343
user3787343

Reputation: 11

Missing comma in SQL command and statement ignored

I have problem from this trigger

create or replace trigger HAPUS_PENDUDUK 
after delete on system.PENDUDUK
for each row
BEGIN
  insert into penduduk_backup values (
     old_nip , old_nama, nama_user, tanggal_perubahan || old: nip, old: nama,
     current_user, sysdate()
  );
END;

After running it writes:

Error(5,3): PL/SQL: SQL Statement ignored
Error(5,94): PL/SQL: ORA-00917: missing comma

but I can't understand where I missed a comma and statment ignored.

Upvotes: 1

Views: 282

Answers (1)

Mureinik
Mureinik

Reputation: 311338

You are not referring to OLD's columns correctly:

create or replace trigger HAPUS_PENDUDUK 
after delete on system.PENDUDUK
for each row
BEGIN
  insert into penduduk_backup values (
     old_nip , old_nama, nama_user, tanggal_perubahan || :OLD.nip, OLD.nama,
     current_user, sysdate()
  );
END;

Upvotes: 1

Related Questions