Combine 2 record in 1 record

I have 2 row data in my table like below :
Id Name Sturc
1 Test Unit
Id Name Value
1 Test 123
I want my output like below:
Id Name Sturc Value
1 Test Unit 123
Did anyone want had how to write PL/SQL to update on my table?
I really appreciate.
Thanks.
Message was edited by:
user582813
Message was edited by:
user582813
Message was edited by:
user582813
Message was edited by:
user582813
Message was edited by:
user582813

Do you mean you have two rows in the same table, like this?
        ID NAME       STURC      VALUE
         1 Test       Unit
         1 Test                    123If so, then you could use a query like this.
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 29 23:43:58 2007
create table t ( id number, name varchar2(10), sturc varchar2(5), value number );
insert into t values ( 1, 'Test', 'Unit', null ) ;
insert into t values ( 1, 'Test', null  , 123  ) ;
commit;
select
  t1.id ,
  t1.name ,
  t1.sturc ,
  t2.value
from
  t t1 inner join t t2 on
  ( t1.id = t2.id and
    t1.name = t1.name and
    t1.sturc is not null and
    t1.value is null and
    t2.sturc is null and
    t2.value is not null
        ID NAME       STURC      VALUE
         1 Test       Unit         123--
Joe Fuda
SQL Snippets

Similar Messages

  • Added records and transferred records

    What is the difference between "transferred records" and "added records" in Infocube-> manage->requests ??
    Karthik

    Hi Karthik,
    You may have 2 records in the source data with same characteristic values. Then these two will be sumarized and added as a single record.
    say suppose:
    C01   M01   100   200
    C01   M02   200   400
    Now only one record is added to Infocube
    C01   M01   300   600
    -> When there are multiple records with in a same request with same characteristic combinations, They will be summarized while updated to Cube.
    In the above case: No. transferred records = 2
    No. Records Added = 1  
    In this kind of scenarios... Always No. transferred records will be more or equal to Added records.
    Some scenarios like where You split records into multiple records using Time distribution or return table... Example: You have monthly revenues in a flat file. But you want to split them into weekly records(based on averege model) and load to Cube. In this kind of scenarios the Added records will be more that Transferred records.
    So-> Dont expect the added records = Transferred records always.
    Hope this helps.
    Suman
    Message was edited by: suman kumar
    Message was edited by: suman kumar

  • Warning message required in po to identify whether price is taking from info record or condition record

    Hi experts,
                        while  creating purchase order,If condition record and info record both are exists means how system will identify that which price need to pick for particular vendor.
                       Is it possible to set  warning or error message for above mentioned scenario.
    Thanks ,
    Deepika.

    If an info record has no  price conditions itself then the price is determined from the last PO.
    It is not always table A017, there are more tables for conditions to the info record, e.g. A018 and A025, this is dependent on the level of your info record which can be created at plant level or at purchasing organization level (no plant entered), with or without material number.
    For more detailed information see the docu in help.sap.com: Price Determination - Purchasing (MM-PUR) - SAP Library
    and the OSS note 456691 - FAQ: Price determination in purchasing
    and 569885 - About Info Record Update indicator (EKPO-SPINF)

  • What's the difference between Transferred Records and Added Records?

    When right click an ODS or a cube to select Manage, then under the 3rd tab called Requests, there are two columns called Transferred Records and Added Records, what's the difference between these two?
    Thanks

    Hello KeLviN,
    How r u ?
    Consider a realtime example.
    Assume a transfer of Transactional Data from R/3(with PSA) which is having Unit values in it.
    Now, I found in RSA3 2844168 of records. In BW I saw one Data Packet with 306 error records(because of a UNIT value is not available in BW T006 table, Eg. YDD) which are automatically collected in PSA. Now in the Monitor screen you could see 2 Monitor status with GREEN Signals for 2 set of data.
    1. with 2843862 records
    2. with 306 records
    Now, if u manage the Data Target you will get 2844168 in the Transferred Records & 2843862 in the Added Records. and the 306 error records are in the PSA.
    Hope this is clear.
    Best Regards....
    Sankar Kumar
    +91 98403 47141

  • How to obtain parent record from child record in relationship using API

    Hi,
    I have a record in the main table that is the child in a parent/child relationship to another main table record.  Using the Java API, how would I obtain the parent record in the relationship where I am starting with the child record?  In the API there seems to just be calls for getChildren, but not a getParent type call.
    Appreciate any immediate help that can be provided.
    Thanks,
    Eddie

    Hi Eddie,
    Please follow the below steps to retrieve only parents of a child Record.
    1. Create RetrieveRelationshipsCommand.
    2. Set the parameter RelationshipId.
    3. Set the parameter Anchor Record and Anchor Record Id. In this case the child record for which parents records to be retrieved.
    4. Set the parameter setGetChildren as false . This retrieves only the parent records for the specified child reocrd.
    5. Execute the RetrieveRelationshipsCommand.
    6. Retrieve member records from above step.
    Hope it helps
    Regards,
    Neeharika

  • (Administration - Marketing - Import), you can set a parameter value "Import mode" for what to do in case of duplication as "update existing records", "Import new records". The final report of this import is presented as a text file that can be viewed in

    Administration - Marketing -> Import, you can set a parameter value "Import mode" for what to do in case of duplication as "update existing records", "Import new records". The final report of this import is presented as a text file that can be viewed in Business Administration - Marketing -> Import -> Exceptions. Whatever the exception, including duplication import occurs during import and recorded in a text file.   What are the fields that determine the duplicity? How I can I can change those?

    You will be returned anything that is in the option's value parameter. What is displayed in the dropdown and what is put in the value attribute do NOT need to be the same, so maybe you should start there.

  • Recording old vinyl records - Sound Card?

    I have an HP Pavilion P7-1054.  I want to record my old records.  I can hook up my turn-table to my amp.  I need to hook up my amp to my computer.  I can buy a mini-to-RCA adapter to hook my amp to my computer sound card.  The instructions say "verify your sound card can handle the line"  I don't see anything in the back of the computer that shows "sound card".   Where would I plug the cable into the computer? 
    This question was solved.
    View Solution.

    Hi,
    Please try line in (yes TRY, I'm not saying this is going to work because you many need more hardware to convert from analog to digital first). Your amplifier  may help but I'm not sure what is your amplifier.
    Figure 5: Back I/O panel
    1 - One electrical S/PDIF Output
    2 - One VGA port
    3 - Four USB 2.0 ports
    4 - One RJ45 10/100 Mb/s LAN
    5 - Center/Subwoofer-out (yellow - orange)
    6 - Rear speaker-out (black)
    7 - Line-in (light blue)
    8 - Line-out (lime)
    9 - Mic-in (pink)
    10 - Side speaker-out (gray)
    11 - One DVI-D port
    Regards.
    Note: 6,7,8,9 & 10 are parts of a sound card/chip.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Recon. account is  missing in master record ; correct master record

    Hi,
    When i tried to book a bill in tcode MIRO , the following error message  is coming.
    Recon. account is  missing in master record ; correct mastwer record  
    Message no. F5144.
    I checked for particular vendor in xk03 ( accounting information ) , Recon. account field is blank..
    How to rectify this problem..
    What will be the consequences if i assigned rec . account now.
    Thanks & regards,
    Hari priya
    Edited by: Hari  Priya on Dec 16, 2008 6:19 AM

    Hi
    1. use tcode XK02 and maintain reconcillation account
    ( based on this company will come to know what is totoal liabilitties to the all vendors)
    2. then proceed furhter steps
    Raju

  • Function Module to convert multiple records into single record and vice-ver

    hi,
    i have a requirement to convert 10 records in an internal table to single record which should be passed
    to a single variable and store in the database.Kindly let me know is there any function module
    which meets my requirement. Also i need to do split one single record to 10 records each of
    say 65 length interval.
    kindly provide me if there is nay functinon module as such.
    I can do with ABAP-OOPS.Please suggest function module.

    I dont think such FM exists, but if you wanna code one it would be simple. Just loop through the internal table, keep concatenating the currently processing record into a long character variable to convert 10 records into one record.

  • Missing "Add Records" and "Refresh Records" options for data sets post domain re-import

    We recently had to re-install the Endeca server and as part of which had to export and re-import the data domains. Everything went fine except for the fact that newly re-imported data sets showcase just the "Manage Attributes" and the "Delete Data Set" options for an administrator login in. The previously available options to "Add Records" and "Refresh Records" beyond manage attributes/Delete Data Set are missing.
    Thoughts? Is there a security setting to enable these?

    So are you talking about the Add Records and Reload Records options for a data set in Studio?
    There are no separate security settings for these options. If a user is an application administrator (is able to edit the application), then they should have access to these options.
    The options are only available for data domains created using the Provisioning Service (created by uploading a file or from the JDBC or BI Server data source from the Data Source Library).
    I don't know if the process of exporting and re-importing the data domains (not sure how you did that) could somehow cause the data sets to no longer know that they were created by the Provisioning Service, in which case those options would not be enabled.

  • Reconcil. acct is missing in master record, correct master record

    Dear Experts,
    i created the intercompany billing document.
    but it has not generated any accounting document.
    it is giving the error Reconcil. acct is missing in master record, correct master record.
    In my customer master record i have filled up reconcil acct.
    and now if i want to made any changes in that i am not able to do that.
    so now what can be the alternate solution for that.

    hello, friend.
    you mentioned that the field for recon account (company code view) has been greyed out in change mode?  it is possible your FI has set this field as display only (text control) while in change mode.  please check with your FI consultant and if so, the field should be made modifiable so you can make changes.
    if this is not possible, then cancelling the intercompany transaction becomes a likely option.
    please post feedback again.

  • Pbm in setting a record as modifed record through coding in TMG

    HI all,
    I have implemented Table Maintenance Generator for a Z table. And i want to perform some action whenever the current record is modified. The problem is that the user will not edit a particular field directly. Instead, on clicking a button (Clear button), the program will delete the value of a particular field in the screen. It means the value has been changed and the Modify event which i have written in TMG should get trigger.
    Since the user donot directly edit, the program does not consider this record as a modifgied record. SO i explicitely make the record as editable record by the following code. But still it is not considering this as modified record.  Can someone telll me how to solve this issue?
    loop at total.
      wa_total = <vim_total_struc>.
    if wa_total-unit_no = zhr_hop_home_un-unit_no.
      wa_total-vim_action = 'U'.
      <vim_total_struc> = wa_total.
      modify total.
    endif.
    clear : total.
    endloop.
    clear : extract, wa_extract.
    loop at extract.
      wa_extract = <vim_extract_struc>.
    if wa_extract-unit_no = zhr_hop_home_un-unit_no.
      wa_extract-vim_action = 'U'.
      <vim_extract_struc> = wa_extract.
      modify extract. " from wa_extract.
    endif.
    clear : extract.
    endloop.
    The 'vim_action' value 'U' is not getting set properly even though it gets assigned correctly when i debug.

    Jessica,
    You may need to put some code in a different event, possibly the following.
    09 After getting the original of an entry
    You will have to find a way to compare the original record to the changed record.  You may have to save some value in memory, and use that value in one of the other events.
    Perhaps you will have to change the <ACTION>  to 'U' in the event where you believe that it should be 'U'.
    Bruce

  • IDoc Control Record and Status Record Code,  where is it!!!

    Hi,
      Where can i see the code for generation of control record and status record of IDoc.
       Thanks in advance for your answers

    hi ,
    1.first create an segment with the fields u want tcode we31 relase it .
    2. create an idoc and assign segment to it tcode we30.
    3.crate a message type  tcode we81
    4.assign that message to idoc  tcode we 82.
    do the ale configarations .
    now u can write the code in our sender system
    *1.     Create parameters/select-options for input data. i.e., message type, logical system.
    parameters : p_mestyp like edmsg-msgtyp default 'ZKKUMSG',
                 p_logsys like tbdlst-logsys obligatory.
    *2.     Create Data objects for control record, data record and database table.
    data : c_segment like edidd-segnam value 'ZKKUSEG',        "Data record (IDoc)-Segment type
           c_idoctp like edidc-idoctp value 'ZKKUIDOC'.            "Control record (IDoc)-Basic type
    data : begin of i_tab occurs 0,
              ZKSNO   like ZKSTD-ZKSNO,
              ZKSNAME like ZKSTD-ZKSNAME,
           end of i_tab.
    data : w_itab like i_tab.
    data : s_segment like ZKKUSEG.
    data : i_edidd like edidd occurs 0 with header line.
    data : i_control_record like edidc.
    data : i_comm_idoc like edidc occurs 0 with header line.
    *3.     Select the data from responding tables into internal table for a defined condition.
    here you have take ur internal table
    *select single zsno zsname from zkiran into corresponding fields of itab where zsno = p_sno.
    *4.     create control record into internal table.
    i_control_record-mestyp = p_mestyp.         "Message Type
    i_control_record-idoctp = c_idoctp.         "Basic type
    i_control_record-rcvprt = 'LS'.             "Partner Type of Receiver
    i_control_record-rcvprn = p_logsys.         "Partner Number of Recipient
    *5.     create data record into internal table.
    *i_edidd-segnam =   c_segment.
    loop at i_tab into w_itab.
    s_segment-zksno    = w_itab-ZKSNO.                     "Application Data
    s_segment-zksname  = w_itab-ZKSNAME.
    i_edidd-sdata     = s_segment.
    i_edidd-segnam    = c_segment.
    clear w_itab.
    append i_edidd.
    endloop.
    *6.     Process ALE Service Layer using the function module  MASTER_IDOC_DISTRIBUTE.  It returns the corresponding IDoc No.s.
    call function 'MASTER_IDOC_DISTRIBUTE'
      exporting
        master_idoc_control            = i_control_record
      tables
        communication_idoc_control     = i_comm_idoc
        master_idoc_data               = i_edidd
      exceptions
        error_in_idoc_control          = 1
        error_writing_idoc_status      = 2
        error_in_idoc_data             = 3
        sending_logical_system_unknown = 4
        others                         = 5.
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    *7.     Display Communication IDocs.
    loop at i_comm_idoc.
      write : / 'Communication IDoc No. is : ', i_comm_idoc-docnum.
    endloop.
    *8.     Commit Work.
    commit work.
    i hope this sample code help u .
    thanks

  • Lifetime of document[ record] in a record center

    hi all,
     would like to know for how many days/ months/years we can keep document as a  record in the record center site collection.
     i have configured the record center and  providing a link to record center to view the  document.now, as per the design will i be able to access the   same document[record] after  few months/years.
    PrasadWT

    Hi Prasad,
    If a document has been declared as a record in a record center, it will be a record until you undeclared it as a record.
    However, the documents may not always be stored in the place where you add them.
    It depends on the Content Organization Rules and Retention Policies set on the records or documents.
    If such rules or policies have been created, actions will be operated on the records or documents such as moving them to another place.
    You can check the Content Organization rules by going to Site settings > Content Organization rules.
    You can check the Retention Policy by going to Library settings > Information management policy settings.
    More references:
    Records management:
    http://blogs.msdn.com/b/mcsnoiwb/archive/2009/11/05/sharepoint-2010-records-management.aspx
    Content Organization rules:
    https://support.office.com/en-us/article/Configure-the-Content-Organizer-to-route-documents-b0875658-69bc-4f48-addb-e3c5f01f2d9a?CorrelationId=ee3c8983-fd6f-4cad-b57e-a9cc4a5d1505&ui=en-US&rs=en-US&ad=US
    Retention Policy:
    https://mikesnotebook.wordpress.com/2013/05/20/sharepoint-retention-policies/
    Best regards.
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Internal table - move record to first record in table

    How can a move a record already in an internal table to the first record in the table? There is no appropriate sort that would make it the first record.

    Assuming the record is in the header:
    delete itab.
    insert itab index 1.
    That should be - assuming sy-index already points to the record you want to move.
    Rob
    Message was edited by: Rob Burbank

  • Split one record into multiple records in Update Rules

    Hello All,
    I am trying to split a single record from R/3 into 2 records.
    My data flow is form R/3 > PSA > ODS > Cube
    when loading data into ODS i have to add the original record as it is to ODS. For second record i have to check a condition, & change few keyfigure values to 0 and fill an extra field.
    Example:
    Record in R/3 :
    Month | %1 | %2 | %3 | % 4 | ORGUNIT | JOB| EMPLOYEE| POSITION|
    02.2006 | 0 | 1 | 0 | 0 | 3000000| 248 | 2546352 | 500000 |
    Record in BW Comm_Structure.
    In Transfer rules i m writing an extra field to the R/3 record.
    Month | %1 | %2 | %3 | % 4 | ORGUNIT | JOB| EMPLOYEE| POSITION| NEW_FIELD |
    02.2006 | 0 | 1 | 0 | 0 | 3000000| 248 | 2546352 | 500000 | 2546352 |
    NEW_FIELD transfer routine :
    If employee NE 0
    Result  =  employee
    else.
    Result = 0 .
    Till this point everything works fine.
    Now i want to load this record into an ODS. I want to split the above single record into 2 records.
    Records in ODS should be :
    Month | %1 | %2 | %3 | % 4 | ORGUNIT | JOB| EMPLOYEE| POSITION| NEW_FIELD |
    02.2006 | 0 | 1 | 0 | 0 | 3000000| 248 | 2546352 | 500000 |  0 |
    02.2006 | 0 | 0 | 0 | 0 | 3000000| 248 | 2546352 | 500000 |  2546352 |
    Condition for NEW_FIELD.
    For first record always NEW_FIELD =0.
    For Second Record
    If NEW_FIELD NE 0.
    Cahnge KF's  %1, %2, %3, %4 = 0.
    If EMPLOYEE is 0 then no need to create extra record.
    I tried to use achieve this using return table, but no success.
    Can any one help me with ABAP syntax please. I am bit weak in ABAP Programming.
    Thanks in advance.
    POPS

    Dear:
    You could do so in update routines. Select the 'return table' option.
    useful links:
    https://forums.sdn.sap.com/click.jspa?searchID=10118555&messageID=2906656
    https://forums.sdn.sap.com/click.jspa?searchID=10118555&messageID=913873
    https://forums.sdn.sap.com/click.jspa?searchID=10118555&messageID=2441579
    Thanks

Maybe you are looking for

  • SOAP Receiver Adapter - Target URL

    Hi, We have a web service scenario, where the Sender is a III Party Java system and PI is the middleware and ECC as our receiver system.  We have a wsdl binding generated from SOAMANAGER.  We are using the WSDL Endpoint as the Target URL in our SOAP

  • Gf4MX440-VTP TV-Out doesnt work.

    I've just buyed a dual gf4 mx440 with 64Mb and TV-Out, TV-In. When I installed it I began working with two monitors witout problems, but when I've tried to connect de TV-Out, it doesnt word. I've checked a hundred times the cable connecting, and it's

  • New Field at Query execution time.

    Dear All, I need some help in Bex User Exit. My requirement is that, I require a new field in Bex report and that field is Flag(Change Flag). the condition is that IF START DATE (CHAR) IS CURRENT MONTH (QUERY EXECUTION MONTH) THEN FLAG SHOUD BE 'Y' E

  • I can't set geo-reminder in iPad, option is not there. Anyone?

    Does anyone know how to set a geo-reminder, since the option is not there. In My iPhone i can choose to set a reminder at a specific time or at a specific place. Is there some other settings that must be done in order to get things working?

  • Rel. proce. for MRP generated PRs

    Dear all Can we effect release procedure (approval) for the PRs which created thru MRP? Pls explain. Thanks in advance