Posts

Showing posts with the label SQL

SQL query to get the string before '@' in an e-mail

select substr ('161ankush037@gmail.com', 1, instr('161ankush037@gmail.com', '@',1,1)-1) str_data from dual;

SQL query to get the list of employees from a table who have same first name

 select first_name, last_name, person_id from per_all_people_f     where first_name in ( select first_name from per_all_people_f group by first_name having count(first_name) >1)     order by first_name ;

Oracle Script to Copy Responsibilities of one user account to another user account

fnd_user_pkg.addresp is an Oracle Seeded API to add responsibilities to a user account. Please find below the pl/sql block using fnd_user_pkg.addresp API /*******************************************************************************  *PURPOSE: To copy responsibilities of one oracle user account to another oracle user account *  *AUTHOR: Oracle Apps Pie                                                *  *******************************************************************************/ -- -- DECLARE   --   resp_count NUMBER := 0;      CURSOR src_user_resp_details   IS      SELECT DISTINCT fa.application_short_name,       fr.responsibility_key                  ,       fsg.security_group_key,       furga.end...