Changing the column value

Hi,
I have to change the column values in a table. The values in the column are to be updated.
For e.g. If the old value is
"xxxxxxxxxx", I need to take that and update into "xxxyyyxxxx".
The column values is so long as its a description field, so its a combination of many other table fields. Its just I need to add one more field.
How can I do that? Any help appreciated.
Thanks

Hi,
See this:
I have got table with DESCRIPTION column which will be updated. Table structure is:
SQL> DESC SOLD_ITEMS;
Nazwa Wartość NULL? Typ
COMPONENT VARCHAR2(255)
SUBCOMPONENT VARCHAR2(255)
YEAR NUMBER(4)
MONTH NUMBER(2)
DAY NUMBER(2)
DEFECTS NUMBER(10)
DESCRIPTION VARCHAR2(200)
Table description contains values from (component, year, month, day & defects) column. I would like to add subcomponent value to this column.
SQL> SELECT * FROM SOLD_ITEMS;
COMPONENT SUBCOMPONENT YEAR MONTH DAY DEFECTS DESCRIPTION
graph bar 2006 4 3 10 graph 2006/4/3
graph bar 2006 4 1 1 graph 2006/4/1
search user search 2006 4 2 23 search 2006/4/2
search user search 2006 4 1 54 search 2006/4/1
search product search 2006 3 20 0 search 2006/3/20
search product search 2006 3 16 3 search 2006/3/16
6 wierszy zostało wybranych.
SQL> EDIT
Zapisano plik afiedt.buf
I use the SUBSTR and LENGTH function to place SUBCOMPONENT value between COMPONENT value and YEAR value. That's how I done it:
1 UPDATE SOLD_ITEMS
2* SET DESCRIPTION = SUBSTR(DESCRIPTION,1,LENGTH(COMPONENT)) || ' ' || SUBCOMPONENT || ' ' || SUBSTR(DESCRIPTION,LENGTH(YEAR))
SQL> /
6 wierszy zostało zmodyfikowanych.
SQL> SELECT DESCRIPTION FROM SOLD_ITEMS;
DESCRIPTION
graph bar 2006/4/3
graph bar 2006/4/1
search user search 2006/4/2
search user search 2006/4/1
search product search 2006/3/20
search product search 2006/3/16
6 wierszy zostało wybranych.
SQL> SPOOL OFF;
Peter D.

Similar Messages

  • How to change the column value upto 68000 rows

    Hi,
    I want to change the column value.
    I have table called RefDoc
    Select distinct r.int_ref from refdoc r where r.int_ref like '\\dxb%'
    Int_Re__f
    \\dxb\Sample\BFE B777\2008\PO2025225.tif
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\dxb\Sample\BFE B777\2008\PO2025253.tif
    \\dxb\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    up to 68000 rows
    I want to change to \\AUH instead of \\dxb.
    I want the table like
    Int_Re__f
    \\AUH\Sample\BFE B777\2008\PO2025225.tif
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\AUH\Sample\BFE B777\2008\PO2025253.tif
    \\AUH\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    Thanks
    Nihar

    user REPLACE function and change it
    UPDATE refdoc
       SET int_ref = REPLACE(int_ref, '\\dxb\', '\\AUH\')
    WHERE int_ref like '\\dxb\%'

  • How to change the column value which is coming from DO by a calculated field?

    Hi all,
    I want to change a column value based on my calculated field value. I have a column which is coming from DO which is based on External Data Source. I have a calculated field in my report. When there is any change in the calculated field then the column which is coming from DO needs to be changed. It means the DO needs to get updated when there is a change in the calculated field. Or like if the calculated field meets some condition then I need to change/update the same in the DO. This has to be done on the fly. the report should not submitted for this. when there is a change in the calculated column the DO column needs to get updated.
    Thanks,
    Venky.

    Ok, I've been a customer for very many years, I'm on a fixed retirement
    income.  I need to reduce my bills, my contract ends in  Dec. I will be
    pursuing other options unless I can get some concessions from Verizon.  My
    future son-in-law was given this loyalty plan, so I know this is a
    reasonable request.  My phone number is (removed)  acct number
    (removed)
    >> Personal information removed to comply with the Verizon Wireless Terms of Service <<
    Edited by:  Verizon Moderator

  • Change the column header according to the filter value ?

    Hello Experts,
    I have a requirement in which the customer wants to change the column header of the Sales Volume Key Figure to change according to the filter selected for the Calender Year / Month in the Free characteristics.
    I could display the header as 'Sales Volume for OCT 2000' as this is the value restricted intially in the free characteristics for Calender Year / Month.
    Any suggestion is appreciated.
    Thanks,

    Ioan Thanks for the reply.
    Probably my previous explanation of the problem was a little incomplete. Let me give a better description.
    The situation is something like this.
    I have a requirement in which the customer wants the column header to reflect the 'keep filter value' restriction that he does dynamically in the query report.
    i.e:
    -- usually the kf column header shows 'sales volume'
    -- column header with text variable of the Calender year / month variable -- 'sales volume for 2000 oct'
    -- but when the report is run, if the user wants to go and change the filter:   calender year / month > rt clk > keep filer value > select Jan 2003.
      The kf column header still shows 'Sales Volume 2000 Oct'
    How to make the column header change to 'sales volume for Jan  2003' ?
    Any suggestions greatly appreciated.
    Thanks,

  • How can i  change the column label text in a alv table display

    how can i change the column label text in a alv table display??
    A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
    <i>*  declare column, settings, header object
    DATA: lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
    get column by specifying column name.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
    set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( ' ' ).</i>
    My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
    <i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
    i have checked in debugging and the error occured at the statement :
    <i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
    Thanks,
    Suri

    I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
      DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
             lr_if_controller  TYPE REF TO iwci_salv_wd_table,
             lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
             lr_col    TYPE REF TO cl_salv_wd_column.
      DATA : node_year  TYPE REF TO if_wd_context_node,
             elem_year  TYPE REF TO if_wd_context_element,
             stru_year  TYPE if_alv_layout=>element_importing,
             item_year  LIKE stru_year-i_current_year,
             lf_string    TYPE char(x),
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    Get the entered value from the input field of the screen
    node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
    elem_year  = node_year->get_element( ).
      elem_year->get_attribute(
       EXPORTING
        name = 'IMPORT_NODE-PARAMETER'
       IMPORTING
        value = L_IMPORT_PARAM ).
      WRITE L_IMPORT_PARAM TO lf_string.
    Get the reference of the table
      lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lr_if_controller  = wd_this->wd_cpifc_alv( ).
      lr_column_settings = lr_if_controller->get_model( ).
    get column by specifying column name.
      IF lr_column_settings IS BOUND.
        lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
    set Header Text as null
        lr_column_header = lr_column->get_header( ).
        lr_column_header->set_text( lf_string ).
    endif.

  • How to change the column order in the DB?

    Hi all,
    For example,
         there is an employee database with the field names empno(1),empname(2), empphone(3), empaddress(4), empsal(5). the values in the brackets are the column order i.e., the order in which the column names are placed.
         I have the details of the employee records in a .txt file and i have to upload the file with the same column order with some delimiter. I done it but in future if any one have the details of the employee details with some other column order i.e., empaddress(1), empsal(5), empno(3), empname(4), empphone(5)
         how i can change the column order of the database ...
    Thanx in advance...
    Bye,

    how i can change the column order of the databaseYou don't. You specify the column order in you're insert.
    PreparedStatement pstmt = conn.prepareStatement ("insert into EMP (EMPNO, ENAME) values (?, ?)");
    pstmt.setInt (1, 1500);
    pstmt.setString (2, "A Name");
    pstmt.execute ();
    Steve.

  • Is it possible to change the column headings when ever i execute the query

    in the runtime i want to change the column headings is that is possible.
    Ex: if write a timestampadd(.......) function in the table heading is that change the dates automatically whenever i execute the query?
    is this is possible?
    Product name 1-2-10 5-6-10
    aaaa 5 6
    bbfff 6 10

    Product name 1-2-10 5-6-10
    aaaa 5 6
    bbfff 6 10It looks like the dates are values in a column? Put that column in the Columns section of the Pivot Table and Product Name in the Rows section and it should produce what you are looking for.
    Edited by: David_T on May 19, 2010 2:33 PM

  • How to change the column header name dynamically based on sysdate

    Post Author: senthi_gokul
    CA Forum: WebIntelligence Reporting
    Dear All,
            i have designed some reports. i would like to change the column header dynamically based on sysdate. up to 24 months. can u help me, which add month function using the universe. i dont know if-then-else function is having the universe tool or not?

    Post Author: prasingh
    CA Forum: WebIntelligence Reporting
    Are you saying you are not able to create an object by value (select: statement) as sysdate and put it onto the headers of your report? You can use the add_months() function on the object to add the numbers of months you wish.
    Please let me knnow for more.. You can get in touch with me on [email protected] for quick reply. 

  • Changing the Column Header and Hiding the Column dynamically???

    Hi friends..
    I'm new to OBIEE field. I'm working in a OBIEE project that requires to dynamically change the column header, and dynamically hide the column depending on the prompt value.
    I know we can dynamically change the table header using the presentation variable but I couldn't do that same thing with column header.
    I searched some forums that suggest to use java script for this purpose but I'm not able to do the same also. If anyone had same issue before please help.

    toony, I'm not sure it's possible to do all that you want exactly the way you want, but here are some ideas you can pursue.
    To dynamically change column headers without javascript, check this blog out...
    http://oraclebizint.wordpress.com/2008/01/25/oracle-bi-ee-101332-dynamic-column-headers-using-presentation-variables-sets-and-conditional-formatting/
    As far as dynamically hiding a column, I don't think you can do this, but since you don't provide any details on how the PV is supposed to hide a column based on the value, are you talking about hiding a column for one PV value and another (different) column for a different PV value? Or are you talking about hiding one column when a PV has certain values and displaying it when the PV has a different set of values?
    I have managed to create both scenarios via a work-around, but the procedures require some writing so I don't want to put both. Please detail how you want your PV to "hide" a column or columns.
    P.S. I don't think column selectors will do the trick for you. Basically column selectors work like this: Say you have a report using Sales Region ID, Region Name, and Sales. Now let's say you want the user to choose if he/she wants to see annual sales, or quarter sales or weekly sales, etc. The column selector view would allow you to put the various columns (Year Sales, Quarter Sales, Weekly Sales) as an option the user can select. Once selected, the sales figure will change for the time period selected. For an example of how this is done, check out the section in this "Oracle by Example" link.
    Waited too long to publish this... Madan beat me to it, so there is some overlap here...
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/saw/saw.html
    Edited by: LC143 on Oct 27, 2008 9:21 AM

  • Change the column names programatically

    Hi All,
    is it possible to change the column name in a table programatically?? my req is like this..I ve a table which contains 60 columns. out of these 60 columns 53 columns signifies the 53 weeks of the year. so i ve to display the date in the column headers. How can i achieve this?
    Thanks in advance,
    Sree

    Column prompts can be modified through the OAF Personalization screens. This will ensure you are declaratively setting the values.
    Regards,
    Prabodh.

  • How to change the column text of an ALV in WD?

    Hiya,
    I have an ALV and it displays this in the column headings:
    I'd like to change 'Name 1' to 'Name' and 'Boolean' to 'Selection', but I can't seem to figure out how to do this in the maze of all the classes and methods...
    Could someone give me a few pointers please.
    Thanks in advance!

    Hi ,
    We can change the column heading through if_salv_wd_column_settings interface. Please check the following code for changing the same.
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
      data l_salv_wd_table type ref to iwci_salv_wd_table.
      l_salv_wd_table = wd_this->wd_cpifc_alv( ).
      data l_table type ref to cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
      data l_column type ref to cl_salv_wd_column.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'Name_1' ).
      data l_header type ref to cl_salv_wd_column_header.
      l_header = l_column->get_header( ).
      l_header->set_prop_ddic_binding_field(
        property =  if_salv_wd_c_ddic_binding=>bind_prop_text
        value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
      l_header->set_text( `Name` ).
      l_column = l_table->if_salv_wd_column_settings~get_column( 'Boolean' ).
      data l_header type ref to cl_salv_wd_column_header.
      l_header = l_column->get_header( ).
      l_header->set_prop_ddic_binding_field(
        property =  if_salv_wd_c_ddic_binding=>bind_prop_text
        value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
      l_header->set_text( `Selection` ).
    Regards,
    Harsha

  • How to add spaces to the column value to make it up specifi length string please

    Hello There,
    Could you please guide me here to solve this issue,
    in my column (named as State) contains values as below
    California
    Washington
    Utah
    Connecticut
    Massachusets
    in the output how can i add a spaces to make up every column values as 15 length (for ex, Utah is 4 length then need to add 11 spaces, California is 10 would like to add 5 spaces)
    i tried below but no use in Sql 2008 R2
    SELECT  distinct state
       state
    +SPACE(35-len(state)),
    len(state+SPACE(35-len(state)))
    FROM dbo.ordersInfo
    Thank you in advance
    Milan

    Fixed length CHAR(n) data in SQL is automatically padded with spaces. Either change the column's data type or cast to it. Also, the ISO-11179 rules are that the column should be "state_name" and not just the root attribute "state" -- state_code, state_population,
    etc are a few of the confusions you created. 
    Another rule of RDBMS is that we do not do display formatting in the data. That is what presentation layers do. Why are you trying to fake COBOL in SQL? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to get the column values from a BC4J View Table in UIXML?

    I am using a default UiXML Application for Order Entry system with Orders & Order Lines & Customers. I have a uix file OrdersView1_View.uix which displays (no updateable columns) all the Orders. How do I get the column value of a selected row in a BC4J Table (example:OrdersId) when a Submit button is pressed using UIXML or Java Classes?
    I appreciate any help on this.

    Hi,
    You need to use keyStamp, an example:
    <bc4j table name="orders">
    <bc4j:keyStamp>
    <bc4j:rowKey name="key" />
    </bc4j:keyStamp>
    Furthermore, you can automatically send the selected row key using the go event handler, so in the handlers section you could send the key to an orderInfo page:
    <event name="show">
    <!-- forward to the update page, passing
    the selected key as a page property -->
    <ctrl:go name="orderInfo" redirect="true">
    <ctrl:property name="key">
    <ctrl:selection name="orders" key="key" />
    </ctrl:property>
    </ctrl:go>
    </event>

  • Return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST

    Hi,
    How to return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST?
    For example : if the row has 3 columns then after selecting the particular row, the RETURN_TAB internal table should contain all the three column values.
    Regards,
    Raghu

    Hi,
       Try the following...
    DATA : it_fields like help_value occurs 1 with header line.
    data: begin of w_vbap,
            vbeln      like vbap-vbeln,    
            posnr      like vbap-posnr,   
            werks      like vbap-werks,  
          end of w_vbap.
    data: i_vbap   like w_vbap   occurs 0 with header line,
             w_fields type help_value,
          i_dfies type table of dfies,
          i_return_tab type table of ddshretval with header line,
          i_field  type dfies.
      select vbeln posnr werks
          from vbap into table i_vbap up to 5 rows.
    if sy-subrc = 0.
       sort i_vbap by vbeln.
    endif.
      clear it_fields[] , it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'VBELN'.
      it_fields-selectflag = c_on.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'POSNR'.
      it_fields-selectflag = space.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'WERKS'.
      it_fields-selectflag = space.
      append it_fields.
      loop at it_fields into w_fields.
        i_field-tabname   = w_fields-tabname.
        i_field-fieldname = w_fields-fieldname.
        i_field-keyflag   = w_fields-selectflag.
        append i_field to i_dfies.
      endloop.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield               = 'VBELN'
         window_title           = 'Select'
        tables
          value_tab              = i_vbap
          field_tab                = i_dfies
          return_tab             = i_return_tab
       exceptions
         parameter_error        = 1
         no_values_found        = 2
         others                 = 3
      read table i_return_tab into w_return_tab index 1.
      if sy-subrc = 0.
      endif.
    Regards,
    Srini.

  • How to change the profile value in the pl/sql code without making change in the database

    How to change the profile value in the pl/sql code without making change in the database.

    I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
    if these Profiles are set for the user running this program automatic printing should not be done.

Maybe you are looking for

  • Foreign Currency Payment

    Could anyone explain this senario to me? One supplier in USA issued the bills in USD and we recorded the invoice in SAP in USD as well, later on we paid them off while from the outgoing module and choose the usd as currency and from my USD bank accou

  • JSP's include embedded in a String ???

    Hi All, I'am building an HTML string, which includes a JSP file as, "<%@ include file=\"../jsp/SST_Links.jsp\" %>" When the JSP is converted to a servlet the above line becomes, "<%@ include file=\"../jsp/SST_Links.jsp\" which means, the rest of the

  • Add column to table

    When adding a new column to a table, it is not possible to insert/update data during the same session because new column is named "null" in the generated SQL-statement. In case you want to update an existing record after adding a new column, you can

  • Adding objects to the scenegraph

    Hi, I am tryin to add a simple sphere primitive to my program. If i call the method createASphere (see below)in the createScenegraph method, the sphere is added with no problems. However, when i comment out createASphere(), and try calling the method

  • Application errors

    i have recently updated my phone sofyware to v08.63. After its completion and restoration of backups, I now get  the following error whenever I try opening my applications: Class Not Found java/lang/ClassNotFoundException Please help me out on how to