My trigger code is below :
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.