How to delete a virtual column in a table

Is it possible to delete a virtual column in a table. Please give the complete syntax to help do it

Like this...
SQL> select * from dept;
    DEPTNO DNAME          LOC
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
SQL> alter table dept add (sal as (deptno*10));
Table altered.
SQL> select * from dept;
    DEPTNO DNAME          LOC                  SAL
        10 ACCOUNTING     NEW YORK             100
        20 RESEARCH       DALLAS               200
        30 SALES          CHICAGO              300
        40 OPERATIONS     BOSTON               400
SQL> alter table dept drop (sal);
Table altered.
SQL> select * from dept;
    DEPTNO DNAME          LOC
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

Similar Messages

  • How to delete a perticular column value

    Hi,
    I have a table Tbl_Outdirection, In this i have 10 columns. My Query is how to delete a particular column or columns value from the table, Not entire row.
    Please help me.
    Thanks

    Deleting a column value is probably updating it to NULL, in your case.
    So,
    update [table]
    set column = NULL
    where [condition to identify the row]
    /

  • How to delete a particular row in ALV table

    Hi,
    How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
    Thanks
    Bala Duvvuri

    Hello Bala,
    Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
    data : lr_table_settings  TYPE REF TO if_salv_wd_table_settings,
                 lr_config          TYPE REF TO cl_salv_wd_config_table.
      lr_table_settings  ?= lr_config.
    ** Setting the ALV selection to multiple selection with no lead selection
      lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
    Next delete the selected rows in the action triggered by the button:
    METHOD onactiondelete_rows .
      DATA:  wd_node TYPE REF TO if_wd_context_node,
             lt_node1 TYPE ig_componentcontroller=>elements_node,
             wa_temp  TYPE REF TO if_wd_context_element,
             lt_temp  TYPE wdr_context_element_set,
             row_number TYPE i VALUE 0.
      wd_node = wd_context->get_child_node( name = 'NODE' ).
      CALL METHOD wd_node->get_selected_elements
        RECEIVING
          set = lt_temp.
      LOOP AT lt_temp INTO wa_temp.
        wd_node->remove_element( EXPORTING element = wa_temp ).
      ENDLOOP.
      CALL METHOD wd_node->get_static_attributes_table
        EXPORTING
          from  = 1
          to    = 2147483647
        IMPORTING
          table = lt_node1.
      wd_node->bind_table( new_items = lt_node1 ).
    ENDMETHOD.
    If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
    Regards,
    Uday

  • How we can replace the column in Core Table plz see this msg

    Hi,
    How we can replace the column in Core Table plz see this msg
    Req:
    when i push the Insert button the data inserted into the Table
    like
    Cols Values
    FOCD      CUFZ14
    PRDCD FU6
    Month 082008
    AgencyCD AG02
    PLAN 123
    This is FO_Plan Table....
    Requirement:
    i need at table show to replace the Prd_CD to Prd_Desc while inserting the above Row....
    There is no Prd_Desc in FO Plan Table....
    Prd_desc comes from Product Table.
    did u get my point...
    how to solve.
    Thanks
    Ram
    Edited by: Ram Vungarala on Sep 24, 2008 9:09 AM
    Edited by: Ram Vungarala on Sep 24, 2008 9:15 AM

    Hi,
    I'm not sure if I understood what are you trying to do. But you can modify your table in a backing bean code. JSF page code for a table:
    <af:table id="product_search_results_tbl" binding="#{backingBean.boundTable}" ... />
    And a backing bean code:
    import oracle.adf.view.faces.component.core.data.CoreTable;
    public class YourBackingBean {
        private CoreTable boundTable;
        public void setBoundTable(CoreTable boundTable) {
            this.boundTable = boundTable;
        public CoreTable getBoundTable() {
            return boundTable;
       public String insertButtonAction() {
          // Bind your button action to this method and modify here your bound table
         return null;
    {code}
    Look for column modification methods in a CoreTable class documentation.
    Marius                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to delete the duplicate data  from PSA Table

    Dear All,
    How to delete the duplicate data  from PSA Table, I have the purchase cube and I am getting the data from Item data source.
    In PSA table, I found the some cancellation records for that particular records quantity  would be negative for the same record value would be positive.
    Due to this reason the quantity is updated to target but the values would summarized and got  the summarized value  of all normal and cancellation .
    Please let me know the solution how to delete the data while updating to the target.
    Thanks
    Regards,
    Sai

    Hi,
    in deleting the records in PSA table difficult and how many you will the delete.
    you can achieve the different ways.
    1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
    2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
    3.you can restrict the cancellation records at query level.
    Thanks,
    Phani.

  • How to provide Link to Column in  the Table

    Hi
    please let me know how to provide link to one column in the table.
    i have two views
    in one view i will dispaly emp id and emp dept in a table
    i have to provide link to the emp id column table
    when i click emp id column then it will fire other view and display remaining details of emp.
    so please let me know how to provide link to column in the table.
    Solution is urgent
    regards
    mmukesh

    Hi Mukesh,
       You can insert LinkToAction column in table.you can have two cattributes in Valuenode one is of type boolean and other is of type string(empno)
    you can create eventhander in that you can fire plug to seconf view where you can displays the emp details
    With Regards
    Naidu

  • How to delete or add columns in a DataTable.

    Hi,
    I need to delete/add columns for a DataTable programaticaly... Can anyone help me in this ??. In source code I added a datatable and lets take 3 columsn I added. While running application, I need to delete and add columns whenever I want.
    Please help me....

    can you give a sample code for this... I really want
    this code...
    just to re-confirm you, I want to add or delete
    columns not rows...I don't have sample code, why don't you give it a try?

  • Can i delete the Subtotal column in Cross Table?

    i create a crosstab named: hr_count, used for counting different kind of employees.
    and in 'crosstab expert', the 'column' area, i have 2 items: level_1 and level_2; the 'row' area has 1 item: department.
    my problem is, there's always a 'subtotal' column at the last column of every level 1 area, but i don't need it, i can see the 'total' number at the very last column.
    how can i delete or suppress this 'subtotal' column?
    i know i can suppress the very last 'total' column by right click mouse and choose not to show this column, but it seems i can do nothing to the 'subtotal' column. or, i must keep this 'subtotal' column in the table?

    Hi Stefanie Tan ,
    You can suppress the sub totals, Right click on your cross tba and go in Cross Tab Expart--Customize Style tab here you will find Rows: and Columns; which will have fileds.  Now click on Rows fields once you click on sub group field you can see suppress subtotal check box enables click in that check box and click on Ok.  Now check for sub totals.
    Thanks,
    Sastry

  • How to extend No. of columns for PIVOT table in BI Publisher Desktop

    Hello Everyone,
      I am using the Oracle BI Publisher Desktop to design the TEMPLATE for Oracle Reports.
    I need to create the PIVOT table .In my PIVOT table I need to display 9 columns but when I tried to create PIVOT table by dragging 9 columns only first 4 columns are displaying in report.
    Can anyone suggest me how can I increase the number of columns in PIVOT table?
    Thank You.
    Regards,
    Guru.

    hi jim
    if you carefully look inside the form field's you will find the logic of sort . if you remove that you will get the data without any sorting order.
    else send me your template and xml to my email id i can look into that .
    email : [email protected]

  • How to delete the trailng zeros in my table

    Hai
    I had a serious problem
    My table name called nrgp_main
    Here nrgpno declared as char(8) i had changed as 10 by mistake and i have update two times
    the number is like this 003800001 i need to cut the first '0' and update it
    Thanks & regards
    Srikkanth

    Duplicate post
    how to delete the trailng zeros in my table

  • How to delete the line for 300SAP* in table USR02 in SQL Management studio

    Hello
    I used to delete the line for 300SAP* in table USR02 in SQL Enterprise Manager. After I could log on with “pass”.
    I wander how to delete it in SQL Management studio. When I expand tdatabase it takes so long time and it is uncontrollable

    Hello,
    you have to delete the row by a sql statement.
    Open a new query and run a script like this:
    use <Your SID DB>                 -- e.g. use PRD
    setuser 'your sid in lowercase'  --- e.g. setuser 'prd'
    delete from USR02 where MANDT = '300' and BNAME = 'sap*'
    go
    Run a complete backup before deleting data manually.
    Regards
      Clas

  • How to delete the complete contents of database table ? should be empty !!

    Hi Guys,
    I have requirement where i have delete the contents of database table..i have make it empty (no records at all) and then i have to fill it with the records from the excel sheet.
    I can upload data from the excel sheet.
    Please tell me how to delete the complete contents of the database table ??
    Regards
    Rahul

    hi ,
    just write like this,
    delete from <database table>.
    commit work.
    sample code, here edpar is database table.
    delete from edpar." FROM TABLE g_tab_delete.
      call function 'DB_COMMIT'.
      loop at g_tab_edpar into g_wa_edpar.
        insert into edpar values g_wa_edpar.
        if sy-subrc  eq 0.
          move-corresponding g_wa_edpar to g_wa_edpar1.
          append g_wa_edpar1 to g_tab_edpar1.
        else.
          move-corresponding g_wa_edpar to g_wa_edpar2.
          append g_wa_edpar2 to g_tab_edpar2.
        endif.
      endloop.
    that's all it works.
    reward points if helpful.
    regards,
    seshu.

  • How to get the primarykey columns of the table in SAP BI Java SDK

    Hi, I'm new to sap BI Java SDK. I'm not getting how to get the primarykey columns, using BI JDBC Connector (for relational data sources). If anybody knows, please let me know. its very very urgent task to be done in my project. In the below following code.... I have written a code to connect to the database through resource bundle, reading table names, once user select table name, i need to show the primary key columns of that table to the user. here i'm not getting how to get the primary key columns . Please send me the code if there is any method to find out the primarykey columns or a logic to get them. I will be greatful to you.... if you can do this favour.
    Please check out the following code ........
    ManagedConnectionFactory mcf;
    IConnectionFactory cf;
    IConnectionSpec cs;
    mcf = new JdbcManagedConnectionFactory();
    cf = (IConnectionFactory) mcf.createConnectionFactory();
    cs = cf.getConnectionSpec();
    ResourceBundle rbLocal = ResourceBundle.getBundle( "xxxx");
    Enumeration propnames = rbLocal.getKeys();
    while (propnames.hasMoreElements())
    String key = (String) propnames.nextElement(); //out.print(key); //out.println("="rbLocal.getString(key)"");
    cs.setPropertyValue(key, rbLocal.getString(key));
    // Establishing the connection. // The IBIRelational interface provides an entrypoint to access // metadata and execute queries.
    IBIConnection connection = (IBIConnection) cf.getConnectionEx(cs); I
    BIRelational rel = connection.getRelational();
    IBIQuery query = rel.createQuery();
    String sqlStatement = "SELECT * FROM " + "BICQPERSON where type='pk'"; ResultSet rs = IBIDataSet dataset = query.execute();
    Thanks SreeKanth

    Hi,
    looks like you are on Infomation Builders, correct? If yes through which adapter and to what DB are you connecting?? in an R3/BW system you can do the folowing:
    "(ABAP)
    SELECT DISTINCT FIELDNAME
    FROM DD03L
    WHERE TABNAME = '/BIC/QPERSON'
      AND AS4LOCAL = 'A'
      AND KEYFLAG = 'X'
    ORDER BY 1
    Another option is goto directly to the RDBMS; in this case let me which one are you using
    hope this helps...
    Olivier.
    Message was edited by:
            Olivier Cora

  • How to insert filename as column in external table.

    I have an external table that is made up by number of different files. I would like to add a new column in the table to store the actual external filename. How can this be done?
    thanks in advanced

    That's going to be a problem, then. The ISO 8859-1 character set doesn't support that character, so you cannot store a ™ in a CHAR or VARCHAR2 column in your database.
    Potentially, you could use an NCHAR or NVARCHAR2 column, depending on your national character set. Using the national character set, though, can cause other problems, particularly for front-end applications that may not fully support those data types.
    You could also potentially change your existing character set to something that does support that character, but that may be a rather involved sort of change.
    Justin

  • How to populate the organization_code column in ST table for legacy system

    Hi, dear all,
    Now I use the stage table to load the setup&transaction collection data from a non-EBS legacy system to ASCP system.
    My question is: how to populate the organization_code column in the stage table?If the source system is EBS system, maybe it's an inventory organization code. But for the non-EBS system, which value is need fo this field? keep it as blank? or assign some value for it?
    Thanks
    Edited by: 852938 on 2011-5-4 下午10:24

    I find some words in the implementation guide, it says:"To collect data from your non-Oracle ERP systems or your trading partners' systems,you model each non-Oracle ERP system or trading partner as an Oracle Applications organization and store their setup and transaction data there".
    But I can't find where to model the application organization for the legacy system.
    anyone can give some clues? Thanks in advance.

Maybe you are looking for

  • Updating Palm TX to 32 bit Win 7 Pro from XP: use XP mode? Or Win 7?

    I am really good at making fatal errors with technology and my Palm is too critical to risk,  so I bought a 32 bit laptop, with Windows 7 pro and XP mode installed.   I have scoured the forums  but all I can find are problems/solutions with 64 bits (

  • Ripped CDs wont show up in iTunes library

    I've recently got an iPod touch 5th generation, mainly because my MP3 player doesn't have enough space for my music. I've tried looking on the internet but nothing has really helped my situation. As I found out, you can't sync the iPod with Windows M

  • Print crashes Pages

    Hey all. I am having an odd problem. When I try to print a document on my MacBook Pro (Core Duo), my Pages app crashes. I don't even get the screen asking for the settings, it just fails right then and there. I have tried exporting as a PDF (which is

  • Why J2EE server cannot start up

    Hi, I downloaded SAP NetWeaver 2004 trial java edition. In the first several days it worked fine, but this week, after start up, J2EE server keeps in Starting apps stage. More than 24 hours has passed, but CPU time for J2EE server is only 2 minutes o

  • How do I update to Lion for free since I just bought my macbook pro about 3 weeks ago?

    I recently bought a macbook pro and would like to update to the most recent lion. I am told I can do this for free since I only purchased the macbook pro about 2-3 weeks ago.  I dont know how to find the receipt for my purchase of my mac b/c I bought