New company name : mass update mail address

Hello,
The company I am working for is going to change its name so I have to update all the mail address. The SQL command todo it is not a problem but I would to like to sure that I have not forgiven any mail address in all the tables. Moreover theses address are sometimes in flexfields.
Do you please know a way to find all the fields or the tables which contain an email address ?
Regards,
Laurent

I have found in an other forum the following procedure that may help someones who want to find a string of characters searching in all the columns off all the tables :
CREATE OR REPLACE procedure APPS.search_db (p_search VARCHAR2, p_type VARCHAR2)
* This procedure will search a user's schema (all tables) for columns matching the user's input.
* ####### Please create the following table before you run this procedure:
* create table search_db_results(result varchar2(256));
* This table will contain the result of the procedure run so that you can view intermediate search results while the procedure is running.
* You pass two parameters to this procedure:
* 1) Search string / number / date (REQUIRED)
* 2) Search datatype (REQUIRED)
* Example:
* exec search_db('hello','VARCHAR2') -- will search for rows in all tables that have a VARCHAR2 column with "hello" as the data.
* exec search_db('01-JAN-2008','DATE') -- will search for all rows in all tables that have a DATE column with the data '01-JAN-2008' in it.
* exec search_db(1000,'NUMBER') -- will search for all rows in all tables that have a NUMBER column with the data 1000 in it.
* Allowed data types: VARCHAR2, CHAR, DATE, NUMBER, FLOAT.
* WARNING!!!!! if you have a large schema be advised that the search can take anywhere from minutes to hours!
IS
TYPE tab_name_arr IS VARRAY(10000) of varchar2(256);
v_tab_arr1 tab_name_arr; /* ARRAY TO HOLD ALL TABLES IN THE USER SCHEMA */
v_col_arr1 tab_name_arr; /* ARRAY TO HOLD ALL COLUMNS IN EACH TABLE */
v_amount_of_tables number(10); /* this holds the amount of tables in the current user schema so that the for loop will know how many times to run */
v_amount_of_cols number(10); /* when searching in a table, this holds the amount of columns in that table so that the for loop searching the table will know how many iterations it needs */
v_search_result number(10); /* when searching the table, this holds the amount of results found. We use this is that if the amount of result found is greated than 0 we will print the name of the table and the column */
v_result_string varchar2(254);
BEGIN
v_tab_arr1 := tab_name_arr(); /*INITIALIZE THE ARRAY*/
v_col_arr1 := tab_name_arr(); /*INITIALIZE THE ARRAY*/
v_col_arr1.EXTEND(1000); /* INITIALIZE THE ARRAY to the maximum amount of columns allowed in a table */
/* This will return the amount of tables in the user schema so that we know how many times we need to invoke the for loop */
select count(table_name)
into v_amount_of_tables
from user_tables;
v_tab_arr1.EXTEND(v_amount_of_tables); /*INITIALIZE THE ARRAY to the number of tables found in the user's schema */
FOR i in 1..v_amount_of_tables LOOP /*LOOP until we reach the maximum amount of tables in the user schema */
/* start populating the tables array with table names. The data is read fomr the data dictionary */
select table_name
into v_tab_arr1(i)
from
select rownum a, table_name
from user_tables
order by table_name
where a = i;
END LOOP;
/* now, after we have an array with all the names of the tables in the user's schmea, we'll start going
over each table and get all of its columns so that we can search every column */
FOR i in 1..v_amount_of_tables LOOP
/*select the amount of columns in the table where the data_type matches the data type the user passed as a parameter to the procedure */
select count(*)
into v_amount_of_cols
from user_tab_columns
where table_name = v_tab_arr1(i)
and data_type = p_type;
/* start searching the clumns ONLY IF there is at least one column with the requested data type in the table */
if v_amount_of_cols <> 0 then
/* do the search for every column in the table */
FOR j in 1..v_amount_of_cols LOOP
select column_name
into v_col_arr1(j)
from
select rownum a, column_name
from user_tab_columns
where table_name = v_tab_arr1(i)
and data_type = p_type
where a = j;
/* each type of data_type has its own SQL query used to search. Here we execute different queries based on the user passed parameter of requested data type */
IF p_type in ('CHAR', 'VARCHAR2', 'NCHAR', 'NVARCHAR2') then
execute immediate 'select count(*) from ' || v_tab_arr1(i) || ' where lower(' || v_col_arr1(j) || ') like ' || '''' || '%' || lower(p_search) || '%' || '''' into v_search_result;
end if;
if p_type in ('DATE') then
execute immediate 'select count(*) from ' || v_tab_arr1(i) || ' where ' || v_col_arr1(j) || ' = ' || '''' || p_search || '''' into v_search_result;
end if;
if p_type in ('NUMBER', 'FLOAT') then
execute immediate 'select count(*) from ' || v_tab_arr1(i) || ' where ' || v_col_arr1(j) || ' = ' || p_search into v_search_result;
end if;
/* if there is at least one row in the table which contains data, return the table name and column name */
if v_search_result > 0 then
v_result_string := v_tab_arr1(i) || '.' || v_col_arr1(j);
execute immediate 'insert into search_db_results values (' || '''' || v_result_string || '''' || ')';
commit;
end if;
END LOOP;
end if;
end loop;
END;
Thanks to David Yahalom who wrote this code.

Similar Messages

  • I "reply"ed to an e-mail message. The next time when I chose to write a new message and type the first letter of the person I replied to earlier, that name and e-mail address appears as a choice included in a pop up list of my contacts.

    I "reply"ed to an e-mail message. The next time when I chose to write a new message and type the first letter of the person I replied to earlier, that name and e-mail address appears as a choice included in a pop up list of my contacts. The persons name is not in my contacts and I would like to delete it from popping up. Do you know how I can do this?

    The Mail app on the iPad/iPhone/iPod Touch does have an option to clear previous recipients. You can learn to live with it.  But if you want to get rid of it, the only way to remove these cached email addresses from the Mail application is restoring the iPhone/iPod Touch as a new phone/iPod.  If you restore from backup, the cache is also restored.
    This article shows you the screens you will see during the restore:  http://support.apple.com/kb/HT1414

  • I have many contacts in address book from a certain company that just changed its name.  Is there a way to globally change all the contacts to the new company name all at once?

    I have many contacts in address book from a certain company that just changed its name.  Is there a way to globally change all the contacts to the new company name all at once?

    Rando510 wrote:
    Although clunky as you say, this sounds like a reasonably efficient way to accomplish what I was seeking.
    Address Book has no global find/replace. Bob Grove suggested one possible workaround; however, a grep-capable text editor (eg, TextWrangler) is better than TextEdit if complex strings are involved.
    An alternative is Bento (which is designed specifically to interact with the AB database), but it's not free.

  • Mail Inbox all Emails do not display sender's name or E-mail address

    After the last update in my Mail all the sender's names or E-mail addresses changed into No Sender. They are real E-mails not spam or junk E-mails. Once I open the E-mail I can see the Sender's name and E-mail address. It is very inconvenient not being able to see who is the sender befoer openning it. How do i fix this?
    Thank you.

    I am fighting with the same problem. In conversation mode my reply shows me as "From" on the left pane. I switched to Classic view which makes life a bit easier as I can see the "Subject" line and guess that this is an email I'm searching for. Can't find the way to put name of the Sender who started conversation in the info summary on the left.

  • I cant access my account as I tunes says no one with my e-mail address exists. If I try to create a new account with my e-mail address, I am told this address is already in use?

    I have had an account for some time. I tried to log on yesterday to be told my credetials were wrong. I tried to reset my password but get 'your session timed out' message after less than 30 seconds! (happened 4 times). I then tried to access my account with my e-mail address. I am tols that there is no account with thaqt e-mail address, but if I try to create a new account with my e-mail address, I am told that address is already in use. To get to this community page I have had to create a new account with a new gmail address. I want to get to my main account as I have credit on that one. Please help?
    gerryfrom hatfield.

    Hello gerryfromhatfield,
    There is a process, an article about how to find your apple id and get access to it. It is named Apple ID: Finding your Apple ID found here: http://support.apple.com/kb/HT5625?viewlocale=en_US
    You start at the top, and work your way down.
    If you can't remember your Apple ID, you can find it by using the password retrieval process at My Apple ID. Follow these steps to recover your Apple ID name:
    Go to My Apple ID and click "Find your Apple ID."
    Complete all the required fields that might be associated with your Apple ID.
    Note: If multiple email addresses have an Apple ID, select your current or most recently used email address.
    All the best,
    Sterling

  • I want to sync my I phone user name (my current e-mail address) with my iPad, PC user name (old e-mail address.) If I delete that current address in the iPhone, won't I also be deleting it in my other devices? They are synced. I don't want to lose it

    I want to sync my I phone user name (my current e-mail address) with my iPad, PC user name (old e-mail address.) If I delete that current address in the iPhone, won't I also be deleting it in my other devices? They are synced. I don't want to lose it. I just want to get it out of the way on my iphone so it doesn't confuse the transfer of ID names and then I want it back again..      I tried deleting the cloud account, being told the current e-mails would be spared. But all it did was pop up a prompt asking me for the password to my still current email ID. So I assume now that I have to go to mail and get rid of the e-mail account. But I'm scared I'll lose everything in my other devices too.

    You can change the email address you use as your apple ID. this doesn't mean you have to delete the old email address as email.
    When you delete an email from your device, it is only removed from the device, it does not delete your emails or the email account.

  • When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does nog display my name or e mail address. This only since upgrading my iPhone5 to iOS7

    When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does not display my name or e mail address. This only since upgrading my iPhone5 to iOS7. I've checked all settings etc. anyone have a solution please?

    Rectory wrote:
    Please can someone tell me how  I can change this so when I send a mail from my phone and from the IPad that it reads from me.
    You need a separate email address but you've already ruled out that solution.

  • I want to make a copy of the names and e-mails addresses in a particular 'category' of my contacts. How do I do it?

    I want to make a hard copy of the names and e-mail addresses in a category of my CONTACTS. How do I go about this?

    Firefox normally doesn't store information for your contacts, although you can have it save information you've filled out in forms...
    Did you set up your contacts in a popular webmail site, such as Yahoo! mail, Hotmail / Windows Live Mail, or Gmail?
    Or using an add-on?

  • I tried to make Apple ID. The process was interrupted by timeout. Re-attempt says, this email address is in use. "Forgot your Apple ID?" can not be identified the names and e-mail address. "Forgot Your Password?" e-mail sent, but never received. What now?

    I tried to make an Apple ID on iPhone 3GS. The process was interrupted by time-out. Re-attempt says, this e-mail address is already in use. "Forgot your Apple ID?" cannot be identified the names and e-mail address. "Forgot Your Password?" e-mail sent, but never received. What now?

    Solved.

  • Need to change name and e-mail address on an account - change of employee

    I need to change the name and e-mail address of a current adobe account to another employees.

    If you know the answers to your security questions, then from http://support.apple.com/kb/HT5312 :
    Navigate to appleid.apple.com using your web browser.
    Click "Manage your account"
    When prompted, sign in using your Apple ID and password.
    Click Password & Security
    You'll be asked to answer 2 of your 3 security questions before you can make any modifications. If you are unable to remember your answers, you can choose to send an email to your rescue email to reset your security questions.
    After you've validated your identity by correctly answering your security questions, click Edit to the right of your rescue email address.
    Once you've finished editing your rescue email address, click the Save button directly below the email field.
    If you can't remember your answers then you will need to contact iTunes Support / Apple in your country to get the questions reset, before you can then use the above steps for potential future use.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699

  • SOST Repeat Send does not ask for new fax number or e-mail address.

    SOST Repeat Send does not ask for new fax number or e-mail address.  It does work for one user but not for any others.  It is supposed to ask you if you want to change the fax number or e-mail address if you were the user that sent the document.  Does anyone know if there are settings that control this somewhere?  Using SAP R/3 vers. 4.7

    Dear Friends,
    Normally, we can change the receipient address, if we send. We can not change the receipient address of another user.
    Check  Note 685164 - Resending with recipient change.
    As per this note Go to SM30 and add parameter "SOST_REC_CHANGE" value "X" in view "SXPARAMS".
    Now, if you click "repeat send" icon, it will ask below two option in dialog box:
    The message is sent again. You can change the recipient before
    sending. The sent message then appears as a
    as a new send request in the list
    Send to same recipients again
    Change recipients before sending
    It is working to me ....
    Thanks & Regards,
    Rajagopal
    Chennai - INDIA.

  • After my company changed the e-mail address, I had to change my Apple-ID. How do I update my purchased Apps after the change?

    The renamed Apple ID does not update all the Apps but comes up with the old AppleID, but that ID is not there anymore and neither the old or the new password is working
    On the FAQ pages I just find a long list of Apps, stores tc. that I have to update, but no explanation on how to do that.
    I do not want to buy all the apps again just because I had to change the e-mail address and because of that the AppleID.
    It is ok to remove the free ones and load them again, but the paid one?
    How is Apple handling such things?

    OK, after reading other and similar threads too, I found a solution myself.
    Thought to share it.
    On my iPhone, after the change was made at the AppleID site, I had to logoff from the old AppleID and then to relogon with the new/changed one. After that I could update all apps again

  • After deleting iCloud and Apple ID accounts from the device, the new user sees the e-mail addresses, whom I wrote earlier letters

    After removal of the iCloud account on iPad and exit all my Apple ID accounts on the device iPad 4, which is used now by another person with other account when he write a new e-mail message the other person sees my contact address. What you need to do to other people could not see my contacts? At the same time they are not in the phonebook

    To fix, first remove your secondary e-mail address that was @mac.com via appleid.apple.com.  This should get rid of that email address (but not the ID).
    Then delete your iCloud account from your iPhone and reactivate it using @me.com as your Apple ID.
    The Apple ID will remain as @mac.com but when you access iCloud Account Information, the Advanced part says "Mail : @me.com".
    Hope this helps.

  • Company name not updating

    i have taken a copy of my TEST db called TEST and restored it to another db which had a company name of LIVE.  Now the company name of my LIVE db shows TEST.  I went to Company Details tab and made sure I changed the company name back to LIVE, but when I click on "Choose Company" it still shows my LIVE db with a name of TEST.  How do i fix?

    Nevermind.  i just clicked refresh button on Choose company window and it updated the company name.

  • 1 How to setup new company name   2 How to setup row, rock and bin

    Hi,
    Anybody who can help me how to setup new company.
    And also how to setup row, rock and bin because we need to assign a location for our spare parts inventory.
    Thanks in advance.

    Row/rack/bin sounds like an inventory system. For a simple system you might want to build your own from scratch, but for even a mid-sized company you really want a shrink-wrapped solution -- i.e. Oracle apps or SAP.
    You don't want to be figuring out how to model material transactions, move orders, etc. Nor do you probably want to dive into various cost accounting options.

Maybe you are looking for

  • What's up with Adobe Application Manager CS6?

    If I select within Pr (CS6): Help > Updates... here is the resulting update check (as expected): But... if I directly run Application Manager either from the Start Menu shortcut, or by running the executable file (PDapp.exe) in this location: C:\Prog

  • Problem in writing a Read Statement

    Hi, In my Table control I have a POSITION button which is used to find the record in the table. I have written the following code.   CALL FUNCTION 'POPUP_GET_VALUES'     EXPORTING *   NO_VALUE_CHECK        = ' '       popup_title           = 'Find th

  • Is there any command to find the running cloud services in the current PC in windows?

    Is there way to find the list of running cloud service providers in the current PC through C++ programming ? Or is there any other tool which gives the list of service providers running in the PC? I know this question is not related to Azure but Azur

  • Buffering on iphone 4s when playing music

    whilst playing any music apps that have been downloaded, it constantly cuts out with buffering.  any suggestions on how i can stop this?

  • No Power BI for Office 365 License???

    Hi, we have installed the free Power BI SharePoint App. We have assigned the free license to two users. It now says correctly that we have 999998 of 1000000 licenses left. So far, so good :-) But...when I click "Power BI" in the left navigation pane,