Adding a single column to mulitple tables

I have to add a single column to 664 tables.
I can copy the column from the table it is originally created in.
Is there a way to paste the column in all the remaining tables?
It doesn't work by selecting all the tables in the design ('Ctrl + a', right click 'paste').
It does work if I click each individual table ('Ctrl', left click) but i do not want to have to click each of the 664 tables.
Thanks,
Nic

You can create script for this purpose for all 664 tables.
And if you use MS Excel to create that script, you will feel a bit relieved. Its not too much difficult, just simple steps to create the script.
In MS Excel
1- In first column Write >>Alter table [Drag this cell for 664 times]
2- In second table Paste >>Table_Name [Select all tables Ctrl+a, and copy table names in this column 664 Tables will come there]
3- In third column Write >>Add (COLUMN_NAME  VARCHAR2(50)); [Drag this cell for 664 times]
Now Script is Ready, You can select all three columns now and paste them in notepad file.
And execute this script in Database;
Hope this will resolve your problem.

Similar Messages

  • How to grey out one single column in a table control of TPMOE

    Hi Experts,
    Any body please tell me how to greyout a single column in a table control of TPMOE.
    Help needed ASAP.
    Thanks,
    sreenivas.

    lr_result      TYPE REF TO if_bol_bo_property_access
    lr_iterator TYPE REF TO if_bol_bo_col_iterator
          CALL METHOD lr_iterator->get_by_index
            EXPORTING
              iv_index  = index
            RECEIVING
              rv_result = lr_result.
          CALL METHOD lr_result->get_property_as_value
            EXPORTING
              iv_attr_name = 'TRANSFER_STATUS'
            IMPORTING
              ev_result    = lv_status.
    if  lv_status = x and component = cost_category.
    rv_disabled = true.
    else.
    call super.
    endif.
    INDEX will have the row number.
    Frame ur logic based on this.

  • Getting parent-child data from a single column in a table

    Hi,
    I have a parent-child data in a column.
    Eg:
    0
    00
    01
    010
    011
    1
    10
    11
    These values are present in the single column itself. My need is to get the parent values for the given child value.
    For eg: If I am giving the input as 011, the query should return all its parents, i.e. 01 and 0
    Could you please give me any inputs on this?
    Thanks,
    GV

    Frank Kulash wrote:
    Assuming that each child's id is formed by adding exactly one character to the end of its parent's id:
    SELECT     id
    FROM     table_x
    START WITH     id          = :target_id
    CONNECT BY     PRIOR id     LIKE id || '_';
    Small tweak to yours Frank if it's just the parents that need identifying...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select '0' as x from dual union all
      2             select '00' from dual union all
      3             select '01' from dual union all
      4             select '010' from dual union all
      5             select '011' from dual union all
      6             select '1' from dual union all
      7             select '10' from dual union all
      8             select '11' from dual)
      9  -- end of test data
    10  SELECT     x
    11  FROM       t, (select '&required' as req from dual) req
    12  WHERE x != req.req
    13  START WITH x = req.req
    14* CONNECT BY PRIOR x LIKE x || '_'
    SQL> /
    Enter value for required: 011
    old  11: FROM   t, (select '&required' as req from dual) req
    new  11: FROM   t, (select '011' as req from dual) req
    X
    01
    0
    SQL> /
    Enter value for required: 11
    old  11: FROM   t, (select '&required' as req from dual) req
    new  11: FROM   t, (select '11' as req from dual) req
    X
    1
    SQL>

  • Update a single column of a table

    Hi Champs,
    I want to update a single column of table PA0000.
    Following is ABAp code I am using:
    UPDATE pa0000 SET massn = wa_upd_actn71-massn
                       WHERE pernr = wa_upd_actn71-pernr AND
                              massn = c_crct_entry.
    where in current scenario wa_upd_actn71-massn = 54,
                                         wa_upd_actn71-pernr = 10005092,
                                         c_crct_entry = 71.
    But this code is not working and note updating the DB table PA0000.
    Can you help me out?
    Edited by: Nishant Khimesra on Apr 7, 2009 2:00 PM
    Edited by: Nishant Khimesra on Apr 7, 2009 2:00 PM

    hiii,
    If u want to update it thr program then write the query as update <dbtablename> set fld = value where <condn>. make sure that the values u pass are converted as per the values in database.
    2nd way is goto se16n
    specify table name and then enter &sap_edit on command line. sap editing function will be edited. specify the filter parameters on the field and then execute the transaction. u can change thd data instantly as the data appears in editable alv.
    Regards,
    Anil N.

  • Adding primary key column in populated table

    Hi all,
    I am trying to add a column into a table which is already populated. The column which needs to be added has to be Primary Key.
    As expected, oracle popped up the error (ORA-01758) that, a NOT NULL column cannot be added unless the table is empty.
    One possibe way is to create a new temp table and then transfer all the current data...renaming the temp table later.
    Is there any other way to accomplish this task?
    Thanks

    Hello,
    As error suggested you cannot add a not null constraint on new column to table which is already populated. What else you can do beside you got fairly simple and quick idea of creating a temp table and moving data?
    You can add new column but null, update the column with the values and alter the table marking column as not null. But your idea of empty temp table is simple and quick one.
    CREATE TABLE my_objects
    AS
       SELECT 'my_new_column' my_new, owner
       FROM all_objects
       WHERE ROWNUM < 1;
    _Not Null_
    ALTER TABLE MY_OBJECTS
    MODIFY(MY_NEW  NOT NULL);
    _Primary key_
    ALTER TABLE MY_OBJECTS
    ADD CONSTRAINT MY_OBJECTS_PK
    PRIMARY KEY
    (MY_NEW);Regards

  • Adding Rows and Columns to a table depending requirements

    Hi all,
    I have created a table with one row and 2 columns of a table. My client requested adding form one to 3 columns of the right table and rows as well, depending business requirements.
    I can add coding add columns on the right, but I cannot add rows because the columns dynamic.
    I tried to write the coding for adding rows but it is not successful.  Please help.
    event : click - add colum button
    for (var i = 0; i < form1.page1.Table1._Row1.count; i++){
    var newrow = form1.page1.Table1.resolveNode("Row1[" + i + "]");
    var newrow2 = form1.page1.Table1.resolveNode("HeaderRow[" + i + "]");
    newrow._Col3D.addInstance(0);
    newrow2._Col3D.addInstance(0);
    i also published my file for your reviewing.
    https://workspaces.acrobat.com/?d=xcgcfby89J-IHenn-8xeaQ
    Thank you very much,
    Cindy

    When you are adding instances it uses the default properties of the object...
    If its hidden as a default value in the form and you add an instance, the new instance will be hidden..
    So if you have 3 columns in your default row and trying to add an instance withthe 5 columns it will only add a row with 3 columns..
    If you want to add the columns to the table, you must add the column to each new row instance.
    E.g.:
    var intCount = xfa.resolveNode("page1.table1.Row1").instanceManager.count;
    form1.page1.table1._Row1.addInstance(1);
    xfa.resolveNode("page1.table1.Row1[" + intCount.toString() + "].Col3D").addInstance(1);

  • How to Sort single column in webdynpro table

    Hi all
    I have requirement as follows.
    i have webdynpro table with the following columns like Date,firstname,lastname,address etc.
    now when i run the the application the table is populating the data at runtime that is fine.
    i need as soon as table is loaded , Date field in the table should be displayed the values in the decending order...i have the requirement as follows...
    how to sort the single column in table ...by default the values of the column displayed with decending order as soon as table displays at runtime....i dont want to click any button specific button to do the sort for that column
    Regards
    bindu

    Hi, I solved the same problem by modifying the sort() method in the default TableSorter class so that it takes a column id and direction rather than an event.
    I assume you have read the TableSorter tutorial.
    Like this. (This was done on nw ce 7.1 btw but may work on older versions as well.
    Oh and then you just call the sort method right after you have made the request
    //Code that goes into controller/view to execute sorting
    wdContext.currentContextElement().getPensionplanTableSorter().sort("MyColumnId", "Up", wdContext.nodePensionPlan());
    //Part of TableSorter.java
    //The original method that needs an event. Now it just calls the new method
    public void sort(IWDCustomEvent wdEvent, IWDNode dataSource) {
         // find the things we need
         String columnId = wdEvent.getString("selectedColumn");
         String direction = wdEvent.getString("sortDirection");
         sort(columnId, direction, dataSource);
    //This is the new method.
    public void sort(String columnId, String direction, IWDNode dataSource) {
         if (columnId == null || direction == null ) {
              return;
         IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
         NodeElementByAttributeComparator elementComparator =
    (NodeElementByAttributeComparator) comparatorForColumn.get(column);
         if (elementComparator == null){
         //not a sortable column
              column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE);
              return;
         // sorting
         elementComparator.setSortDirection(WDTableColumnSortDirection.valueOf(direction));
         dataSource.sortElements(elementComparator);

  • Inserting single column in internal table

    Hiii,
    I have to insert data into a single column of a internal table from a field.The rest of the columns of the internal table are already filled.
    wats is the syntax for it?? plz reply soon...its very urgent.

    Hi,
    try this
    data idx type sy-tabix.
    loop at itab.
    itab-fld1 = 'some value'.    " your empty field
    modify itab index idx.
    endloop.
    Regards,
    V.Balaji
    Reward if Usefull...

  • Need to update a single column in a table with some other column value

    Hi experts,
    I was about to change one column data type in a table. Then I renamed that column name to "old_column_name" . Later I added new column name with required datatype( My case its NCLOB). Now I want to update the new column value with old column value.I mean i have to copy the data. But data amount is very huge. Its more than 1.5 crores of data. But on promote day, I have only 1 hr of outage. Please suggest the effective solution to achieve this.

    Hi Stew
    I have 1 primary key in my table and 11 foreign keys in my table.there are 20 check constraints as well.
    If i go for an online redefine of a table, these objects will be created back automatically?
    Please clarify.
    This is my table. Here Remarks is the column with CLOB datatype. To support multi language, I need to change it to NCLOB. That column having data so i cant rename it.
    So I added new column , after renaming that remarks to old_remarks. Now new column remarks is ready with NCLOB data type, but no data in it.
    To copy the old remarks column into new remarks column, i thought to write one script. But how it is achievable using "DBMS_REDEFINITION". Please explain me,
    create table XXXXXXXXXX
    ID NUMBER(8),
    COMPLETED_DATE DATE,
    COMMUNICATION_MEDIUM VARCHAR2(32),
    REMARKS1 VARCHAR2(4000),
    COPY VARCHAR2(1),
    IO_MARKER VARCHAR2(3),
    EVENT_DATE DATE,
    CON_REF_NO NUMBER(8),
    DEP_CODE VARCHAR2(6),
    SFM_STAFF_NO NUMBER(8),
    CRPD_ID NUMBER(8),
    CRPD_ID_COPY NUMBER(8),
    STATUS VARCHAR2(2),
    COMEBACK_NO NUMBER(2),
    ADD_ADD_ID NUMBER(10),
    AEV_ID NUMBER(8),
    OLAY_ID NUMBER(8),
    COE_TYPE VARCHAR2(3),
    CET_CODE VARCHAR2(6),
    DEP_CODE_RAISED_BY VARCHAR2(6),
    SFM_STAFF_NO_RAISED_BY NUMBER(8),
    USR_CREATED VARCHAR2(30),
    CREATED DATE,
    USR_CHANGED VARCHAR2(30),
    CHANGED DATE,
    EXT_REF_ID VARCHAR2(150),
    REPLY_EXPECTED_DATE DATE,
    SEC_ID VARCHAR2(8) not null,
    PROTECTED VARCHAR2(1),
    APPROVED_BY NUMBER(8),
    DOCUMENT BLOB,
    OLD_REMARKS CLOB,
    CTS_ID NUMBER(8),
    MESSAGE_STATUS VARCHAR2(4),
    WORD_DOCUMENT NCLOB,
    REMARKS NCLOB
    Edited by: Hema on Jul 2, 2012 8:31 AM
    Edited by: Hema on Jul 2, 2012 8:31 AM

  • Creating chart from single column of multiple tables in Numbers '09

    I have multiple tables (spread across multiple sheets) in my document. In column B of each table is a name. The other columns contain other categorized data. Each table has a variable number of rows, but each name is unique within a table. A particular name in any one table may or may not occur in another.
    What I want to do is create a chart that shows the total number of times each unique name occurs across all the tables. Not really sure how to do this...
    I would also like to be able to sort the chart from highest to lowest.
    Message was edited by: Sir Reginald

    That won't quite work, as I have hundreds of names to process. It was a good starting point though. Here's what I had to do:
    1) create a new table (mynames) containing all the names in mynames::A
    2) in mynames::B1 put the formula =SUM(COUNTIF(Table 1::A, A1), COUNTIF(Table 2::A, A1), ...)
    3) Select column mynames::B and then choose *INSERT -> Fill Down* from the menu
    It becomes a bit tedious to have to update the formula and refill the column every time I add another data table. Imagine if I had hundreds of tables to enter. Hmmm....
    I currently have one table per sheet, but if I were to move all the tables onto one sheet, categorize a column, and then collapse all the categories, that wouldn't take up too much space on one sheet. Say I had 100 tables, I could then reduce the formula to:
    =COUNTIF(Table 1:Table 100::A, A1)
    I would also have to make sure to place the mynames table before Table 1 in the table list. All in all, much less of a hassle to add new table data.
    Hopefully, Apple will add multi-sheet spanning collections, in the same way you can do multi-table collections now.
    Message was edited by: Sir Reginald

  • Insert single column into oracle table

    i have a table t1 in whcih only one column is there
    Create table t1
    a number);now i need to load this column from a excel sheet.
    it have many rows and many column but need only corresponding column.
    please suggeest any way apart from external table and sql laoder.
    thanks

    No problem if you have thousands of rows.
    Say the value you want to insert is in column A of your excel file.
    In column B use the following formula:
    =CONCATENATE("insert into t1 values (";A1;");")And copy this formula to all other rows.
    Then select all the B column, copy it and paste it in a notepad file.
    Call the file as you want, for example c:\ins.sql
    open sqlplus and run
    SQL> @c:\ins.sqlAt the end don't forget to commit...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/10/crittografia-in-plsql-utilizzando-dbms_crypto/]

  • Adding a summary column in a table which contains the start and end dates in the week

    Hi,
    I've got a DIMENSION DATE table and want to add in another column which shows the start and end date of the week.
    See below, the new column is WEEKOFYEARTEXT.
    Does anybody know how i may generate this column using SQL and using the existing columns?
    Umar Javed

    See:  http://www.sqlusa.com/bestpractices/datetimeconversion/
    DECLARE @Year INT = '2015';
    WITH cteDays AS (SELECT DayOfYear=Dateadd(dd, number,
    CONVERT(DATE, CONVERT(char(4),@Year)+'0101'))
    FROM master.dbo.spt_values WHERE type='P'),
    CTE AS (SELECT DayOfYear, WeekOfYear=DATEPART(week,DayOfYear)
    FROM cteDays WHERE YEAR(DayOfYear)= @YEAR)
    SELECT WeekOfYear, StartOfWeek=MIN(DayOfYear), EndOfWeek=MAX(DayOfYear)
    FROM CTE GROUP BY WeekOfYear ORDER BY WeekOfYear;
    WeekOfYear StartOfWeek EndOfWeek
    1 2015-01-01 2015-01-03
    2 2015-01-04 2015-01-10
    3 2015-01-11 2015-01-17
    4 2015-01-18 2015-01-24
    5 2015-01-25 2015-01-31
    6 2015-02-01 2015-02-07
    7 2015-02-08 2015-02-14
    8 2015-02-15 2015-02-21
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Adding a field/column in sql table/database and adding the same field /column in biztalk schema

    I have a biztalk application that has a source schema and destination schema inside a map.
    A new field/column in the sql database has been created. Now I have to add this field/record to my source schema.
    My question is, do I manually add this field/record to my source schema and update my source map or do I have to generate a new schema using add generated items>consume adapter service>sql and update my source map ?

    You would need to add the fields to the message schema your SQL data is mapped onto.
    Also update the SQL statement which is executed inside your sql adapter settings to return the new columns.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • I am unable to sort multiple columns in a table created in Pages.

    I had been using Appleworks up until I installed Lion and have now switched to iWork. I created a table within a Pages document and am able to sort a single column (using the Table Inspector and choosing Sort from  Edit Rows and Columns) but the Sort option is grayed out when I attempt to sort multiple columns.
    In another post, someone talked about this being a problem if you have merged fields. I do not believe I have done this (to be honest I don't know the function of merging fields).
    This is very frustrating as I was easily able to sort these tables in Appleworks.

    Sharon Anderson wrote:
    Thanks for your quick response! I have been trying that but then found that Numbers would only let me print in landscape view so I had to paste the table back into Pages. Is there a way to print in portrat view (from Numbers?)
    Not so. In the lower left corner of the window, there's an icon that looks like a piece of paper. If you see this:
    you are in Sheet View, or normal, mode. If you see this:
    You are in Print View mode. Now you see the icons for portrait and landscape modes. Click your choice. Then arrange your content to fit the pages as you wish.
    Jerry

  • Single column in Tableview

    Hi all,
            I want to know how can we display single column of a table using tableview. In the syntax we have  <htmlb:tableView table =......>
    My actual requirement is to display a single column on pressing F4 help and that needs to be done using tableview, but i want to display only one required column instead of all the columns. Plz suggest.
    Regards,
    Rohit Khetarpal

    Hi,
    this code sample can help you..
      <htmlb:tableView id              = "tab01"
                                   table           = "<%= itab2 %>"
                                   headerText      = "Channel and Account Details"
                                   headerVisible   = "TRUE"
                                   width           = "100%"
                                   filter          = "server"
                                   footerVisible   = "true"
                                   visibleRowCount = "10"
                                   onRowSelection  = "myEvent"
                                   selectionMode   = "LINEEDIT" >
                    <htmlb:tableViewColumns>
                      <htmlb:tableViewColumn title      = "Division "
                                             columnName = "DIVISION"
                                             wrapping   = "True" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Distribution Channel"
                                             columnName = "DISTR_CHAN" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Sales Org"
                                             columnName = "SALESORG" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Channel"
                                             columnName = "CHANNEL"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Account"
                                             columnName = "ACCOUNT"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                    </htmlb:tableViewColumns>
                  </htmlb:tableView>
    Regards,
    Ravikiran.

Maybe you are looking for

  • IPod Touch 2nd Gen can stream Youtube but cannot stream Apps that supports Online Streaming , it just kicks itself out of the app

    iPod Touch 2nd Gen can stream Youtube but cannot stream Apps that supports Online Video Streaming , it just kicks itself out of the app. It used to be able to stream apps that supports Online Video Streaming , tried Restore a couple of times and it d

  • Java WebDynpro - Sneak Preview

    Guyz, I installed java stack (sneak preview) couple of months back and when now i'm switching it on, my J2EE Server is automatically switching off after certain time..... upon checking logs in 'Developer Trace', it says its shutting down while licens

  • How to enable logging in OBIEE 10G

    I have LDAP authentication in OBIEE 10 G and users are only residing in LDAP. I have a requirement to enable logging for few users. Can suggest me what all steps are required. I created user in RPD and enabled logging for that user. Kept same user ID

  • Is airplay mirroring not working for macbook air?

    Bought my macbook in March of this year and Apple TV last month. Upgrated to mountain lion and airplay mirroring is producing a black screen. Anyone know how to get this working

  • Rman and Grid 11gR2

    hi all i am using Oracle Grid 11g R2. Oracle Database 11g R2. Oracle Linux 5.5 i want to configure Rman for my Rac i searched and found some notes such as http://oraclehack.blogspot.com/2010/07/oracle-11gr2-rman-netbackup-and-media.html http://oracle