My trigger code is below :
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
create or replace trigger password_setup before update on users for each row declare l_key raw(2000); l_user varchar2(255); invalid_user EXCEPTION; invalid_key EXCEPTION; begin begin select key into l_key from users_keys where user_id = :old.user_id; :new.password := get_enc_val(:new.password,l_key); exception when no_data_found then raise invalid_user ; when others then raise invalid_key; end; exception when invalid_user then raise_application_error(-20001, 'User is not valid'); when invalid_key then raise_application_error(-20000, 'SQL Error is '||SQLERRM); end; /Problem is when I try to update like :
UPDATE USERS SET PASSWORD = 'test123' where user_name = 'Mangesh'It is showing an error: "ORA-01465: invalid hex number." Please suggest something.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.