Collecting same data with different value into a table

Hi,
Can you people help me with this problem.
I have an internal table with different data e.g :
A    2
B    1
C    3
A    1
D    7
B    5
Now i want to put the values of A,B,C,D into another internal table with some other calculation done.
But when i am using READ Table with KEY my second internal table is getting filled with A=2 and the second A=2 as well instead of 1.I guess because it is reading the first record only as its finding A first.
How will i fix this one.
Kind Regards,

>
Prasenjit Sengupta wrote:
> Hi,
>
> Can you people help me with this problem.
> I have an internal table with different data e.g :
> A    2
> B    1
> C    3
> A    1
> D    7
> B    5
> Now i want to put the values of A,B,C,D into another internal table with some other calculation done.
> But when i am using READ Table with KEY my second internal table is getting filled with A=2 and the second A=2 as well instead of 1.I guess because it is reading the first record only as its finding A first.
> How will i fix this one.
>
> Kind Regards,
Can you tell me the exact requirement of yours?

Similar Messages

  • Mix source data with different granularity into the same fact table?

    I have two transaction tables "Incident (157 columns)" and "Unit (70 Colums)". For every "Incident" that happens there could be one or more records in the "Unit" table.
    As part of my data mart design, I have merged both the tables into a single Fact "Incident Fact (227 Columns)" and inserted the records from both the tables with a join condition between them [incident.IN_NUM = Unit.IN_NUM].
    Is this correct, is my question? or am I mixing source data with different granularity in the same fact table. Appreciate your help.
    Best Regards
    Bees

    Bees,
    Are the measures from 'Incident' , repeated for a given incident where it has more than one record in the Unit table ? If so, then the sum(indicent.measure) will give an incorrect result, no ?
    What requirement is there to physically merge the tables together outside of OBIEE? With OBIEE you could have one logical 'fact' table to present to report users, which sourced from seperate Incidents and Units tables and would stop the incorrect aggregations occuring. A common modelling piece in the same way would be Order Headers and Order Lines, quite common in OBIEE to have a logical 'Orders' fact which contained both Order header measures and Order line measures, this translates to your Incidents -> Units relationship.
    To do what I've mentioned, is relatively straight forward, you need a 'Dim - Incident' with two levels, Incident and Unit, mapp the unique identifiers in as the level keys and then use these levels to set the content levels correctly in your 2 logical tables sources for logical 'Fact' , ie Incidents LTS at incident level, Units LTS as units level.
    Hope this helps, let us know if you get stuck.
    Cheers
    Alastair

  • In I-Tunes, how can I consolidate multiple copies of the same album with different tracks into one file in my library screen?

    In Windows 7 , I tunes library/ albums, I have many albums ( all the same) with different tracks in each.
    Is it possible to consolidate the multiple cover photos into one ?

    Generally setting a common Album Artist will fix things, if not see Grouping tracks into albums.
    tt2

  • Merge of two same items with different Qty in po

    Hi Experts,
    Is it possible to merge two Same items with different Quantity into 1.
    For Eg:- 2 similar  items  with qty 2 & 3 must show 5 qty appearing once.Is it possible through Transnotification what should be the query.
    Mona

    Hi Mona,
    If you want to display a Purchase Order on screen summarized by item, set the "Summary Type"  to "By Item" (by default it is "No Summary"). The PO lines will then be summarized by item with total quantity for each item.
    If you want to display it on the printout then you need to modify the PLD. It is quite easy actually. You can use the Repetitive Area Footer to display the summary of each item and set all fields in the Repetitive Area to be not visible and set the height to minimum height.
    Cheers,
    Marini

  • Ability to process several raw files with the same content but with different exposure into the single picture

    Can you add to the Lightroom an ability to process several raw files with the same content but with different exposure into the single picture?
    Base raw files can be given with exposure bracketing during shooting, for example.
    The goal - to get maximum details in darks and lights (if we use the "ligths recovery" or "fill lights" we lose the quality because raw file just have no all required information).
    The similar (but not the same, only the idea) thing - is High Dynamic Range Photography in Adobe Photoshop
    Thank you

    The plugin LR/Enfuse does this already. And of course Photomatix have a plugin available for Lightroom. This essentially amounts to pixel editing, which is beyond the range of Lightroom's metadata editing.

  • Query parameters with the same name and different values

    According to HTTP, multiple query or post parameters with the
    same name and different values are permitted. They are transfered
    over the wire in the following format -
    name1=val1&name1=val2&name1=val3
    The problem is that I can't see anyway of assigning multiple
    parameters with the same name and different values to the request
    object of mx.rpc.http.HTTPService. I have tried using the
    flash.utils.Dictionary object as it does strict key comparison but
    that doesn't work too. I have tried setting an array of values to a
    property of the request object but that sends the request to the
    server in the following format -
    name1=val1,val2,val3
    The java servlet engines throw exceptions when they see this.
    Any help would be greatly appreciated.

    If you're not on 8.1.4 move there. 8.1.3 had limitations in the wsrp
    release.
    wrote:
    I have an html select box that contains several values, and multiple
    selection is enabled. When my code runs as a remote portlet, the
    following is showing up in the soap monitor when I select multiple
    values and submit the form:
    <urn:interactionParams>
    <urn:portletStateChange>cloneBeforeWrite</urn:portletStateChange>
    <urn:interactionState>_action=addEmployeesToGroup</urn:interactionState>
    <urn:formParameters
    name="P62005wlw-select_key:{actionForm.selectedEmployees}OldValue">
    <urn:value>true</urn:value>
    </urn:formParameters>
    <urn:formParameters
    name="P62005wlw-select_key:{actionForm.selectedEmployees}">
    <urn:value>beatest1</urn:value>
    </urn:formParameters>
    In this case, I selected beatest1 and beatest2, but only beatest1 comes
    through to the remote portlet. Is this a known bug, and, if so, is
    there a patch or workaround available?
    Thanks in advance,
    Andy

  • How to update a column with different values but all other row values r sam

    Hi,
    I have a table like this.
    Col1 col2 col3 col4
    10 20 30
    10 20 30
    10 20 30
    i need to update col4 with different values coming from other table like this
    Col1 col2 col3 col4
    10 20 30 xxxx
    10 20 30 yyyy
    10 20 30 zzzz
    how can i update the table. pls let me know how to use the where condition in the update stmt.
    thanks,
    jay
    Edited by: user2558790 on Nov 20, 2009 12:26 PM

    what is the logic for this kind of update...????
    Greetings,
    Sim

  • [OCI] Parameter Binding, repeated Statements with differing values

    Hello
    I am working on an application written in C which sends about 50 different SQL Statements to an Oracle Database using OCI. These Statements are executed repeatedly with different values.
    In order to improve performance I would like to know what possibilities I have.
    Whats the benefit of the following "techniques" ?
    - Parameter Binding
    - Statement Caching
    What else could I look into?
    with friendly greetings.

    It doesn't take zero-time of course, and it does level-off after a while, but array-bind/define or pre-fetching can make a significant impact on performance:
    truncated table: 0.907 / 0.918
    insert_point_stru_1stmt_1commit: x100,000: 0.141 / 0.144Above I truncate the table to get repeatable numbers; deleting all rows from a previous run leaves a large free list (I guess...), and performance of this little contrived benchmark degrades non-negligeably otherwise. This is a single array-bind insert statement.
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@0: 7.594 / 7.608
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@1: 4.000 / 4.004
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@10: 0.906 / 0.910
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@100: 0.297 / 0.288
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@1,000: 0.204 / 0.204
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@10,000: 0.265 / 0.268
    fetched 100,000 rows. (0 errors)Above I do a regular "scalar" define, but turn pre-fetching on (default is one row, but I tested with pre-fetching completly off too). @N means pre-fetch N rows.
    select_points_array: x100,000@10: 0.969 / 0.967
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@100: 0.250 / 0.251
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@1,000: 0.156 / 0.167
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@10,000: 0.156 / 0.157
    fetched 100,000 rows. (0 errors)Above I use array-defines instead of pre-fetch.
    select_points_struct: x100,000@10: 0.938 / 0.935
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@100: 0.219 / 0.217
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@1,000: 0.140 / 0.140
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@1,000: 0.140 / 0.140Above I use array-of-struct defines instead of pre-fetch or array-bind. Performance is just a little better, probably because of better memory "locality" with structures.
    The table is simple:
    create table point_tab(
    id number,
    x binary_float,
    y binary_float,
    z binary_float
    So each row is 22 + 4 + 4 + 4 = 34 bytes. There are no constraints or indexes of course to make it as fast as possible (this is 11g on XP win32, server and client on the same machine, single user, IPC protocol, so it doesn't get much better than this, and is not realistic of true client-server multi-user conditions).
    There aren't enough data point to confirm or not your prediction that the advantage of array-bind level-off at the packet size threshold, but what you write makes sense to me.
    So I went back and tried more sizes. 8K divided by 34 bytes is 240 rows, so I selected 250 rows as the "middle", and bracketed it with 2 upper and lower values which "double" up or down the number of rows:
    truncated table: 0.953 / 0.960
    insert_point_stru_1stmt_1commit: x100,000: 0.219 / 0.220
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@67: 0.329 / 0.320
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@125: 0.297 / 0.296
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@250: 0.250 / 0.237
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@500: 0.218 / 0.210
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@1,000: 0.187 / 0.195
    fetched 99,964 rows. (0 errors)
    select_points_array: x99,964@67: 0.297 / 0.294
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@125: 0.235 / 0.236
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@250: 0.203 / 0.206
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@500: 0.188 / 0.179
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@1,000: 0.156 / 0.165
    fetched 99,964 rows. (0 errors)
    select_points_struct: x99,964@67: 0.250 / 0.254
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@125: 0.203 / 0.207
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@250: 0.172 / 0.168
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@500: 0.157 / 0.152
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@1,000: 0.125 / 0.129As you can see, it still gets faster at 1,000, which is about 32K. I don't know the packet size of course, but 32K sounds big for a packet.
    truncated table: 2.937 / 2.945
    insert_point_stru_1stmt_1commit: x100,000: 0.328 / 0.324
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@1,000: 0.250 / 0.250
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@2,000: 0.266 / 0.262
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@3,000: 0.250 / 0.254
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@4,000: 0.266 / 0.273
    fetched 100,000 rows. (0 errors)
    select_first_n_points: x100,000@5,000: 0.281 / 0.278
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@1,000: 0.172 / 0.165
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@2,000: 0.157 / 0.159
    fetched 99,000 rows. (0 errors)
    select_points_array: x99,000@3,000: 0.156 / 0.157
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@4,000: 0.141 / 0.155
    fetched 100,000 rows. (0 errors)
    select_points_array: x100,000@5,000: 0.157 / 0.164
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@1,000: 0.125 / 0.129
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@2,000: 0.125 / 0.123
    fetched 99,000 rows. (0 errors)
    select_points_struct: x99,000@3,000: 0.125 / 0.120
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@4,000: 0.125 / 0.121
    fetched 100,000 rows. (0 errors)
    select_points_struct: x100,000@5,000: 0.125 / 0.122Above 32K, there doesn't seem to be much benefit (at least in this config. My colleague on linux64 is consistently faster in benchmarks, even connecting to the same servers, when we have the same exact machine). So 32K may indeed be a threshold of sort.
    In all, I hope I've shown there is value in array-binds (or defines), or even simple pre-fetching (but the latter helps in selects only). I don't think one can very often take advantage of it, and I have no clue how it compares to direct-path calls, but value there is still IMHO. --DD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Why does PSE 10 Organizer jumble up photos on the same date from different locations ?

    I have PSE 10 installed on a PC with Windows 7. My camera is a Nikon D90 using a Sandisk 8 gb SD card. When I take photos at different locations on the same date and download them into the Organizer , instead of keeping the photos from the different locations together by location, it jumbles them all up. It does not keep them in order by time taken from first to last for that day , it just mixes them all up in random order. Why ?

    Hi Lyndy,
    When you use Albums and Keyword Tags, you aren't moving the images around (they stay in their folders) - you just look at them differently.
    What you can try is this:-
    1) select one of your folders in folder view so that it displays all of those images in filename order
    2) click on the instant album button (to the top right of the thumbnails)
    This will generate an album with the same name as the folder
    3) Now switch to Thumbnail view
    4) click on the new albumb name on the right side
    Now, all the images should be in date/time order - you may have adjust the options
    The real power of the Keywrd Tags is the many different ways you can look at the images.
    If you have a Keyword Tag structure like this:-
    Places
         Scotland
                Holyrood
                Britania
    Then if you assign the Holyrood and britania tags to the appropiate photos, there are various ways of viewing the photos.
    Selecting just Holyrood would show only the Holyrood ones
    Selecting Scotland would show both Holyrood and Britania ones.
    The only limit seems to be your own imagination
    I hope that gives you ideas rather than adding confusion
    Brian

  • How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    Load the library which doesn't contain the songs and drag them into the open iTunes application window. If you need to move them between different computer user accounts, put them into /Users/Shared/.
    (74502)

  • PDF for multiple users with different values

    Is there a way to create a PDF to be sent to multiple users but have different values in the PDF? For expample employee A's offer letter is for $50/hour while employee B's offer letter is for $55/hour. But they have the same offer letter just with different values.
    I have Enterprise EchoSign and FormsCentral.
    Thank you!

    Hi,
    Thanks for asking, but FormsCentral currently does not support this.
    Perry

  • Mass changes of Material Master field with different values

    Hi,
    How to change a field in Material Master for more than thousand materials. I think MM17 can only be used for mass changes of materials with same values. I need to upload different values for different materials. Is there any other way to do this.
    Thanks,
    K R Vishnu Kumar

    Hi Kumar.
    I think you have to use LSMW for mass updation for Material Master fields with different values.
    Regards,
    Rahul.

  • Sql sript for Insert of data with repeating values

    It has been a long long time since I had to do write and use any SQL scripts, please forgive the question. I used to use a script to insert values into a table as part of my job. I have forgotten what the script I used was and since lost all my Oracle note books and other DBA material.
    I did a search and went through 30 pages of results, I didn't see what I'm looking for.
    The data is from one large file that is appended at the end and sometimes updated somewhere in the middle of the set which is considered new data. I am not concern with getting the data out of the file, I got that handled but the insert into the table - transactions - is where I'm lost.
    I used to use a script to load the data, about 6 years ago, and it would load the file, exclude the data that was already in the table and insert the new data and the data with the changes.
    The data columns are date, time, reference, transaction code, location, debit amount, fee amount, balance.
    The date repeats but the time and reference values are unique.
    Any help with this script is appreciated.

    Hi,
    welcome to the forum..!
    You can use Oracle's merge statement to (update + insert) data into a table ... if the data exists update it with the new values and if it does not, then insert it.
    Here's a link to get you started...
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm
    Since, the data is from a file, you could create an external table on the file and directly do a select from the file.
    MERGE INTO bonuses D
       USING (SELECT employee_id, salary, department_id FROM employees
       WHERE department_id = 80) S
       ON (D.employee_id = S.employee_id)
       WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
         DELETE WHERE (S.salary > 8000)
       WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
         VALUES (S.employee_id, S.salary*0.1)
         WHERE (S.salary <= 8000);in the above example, the
    SELECT employee_id, salary, department_id FROM employeesis the source data. instead of loading the file into a temporary table and then merge into the target table , you could read from <<<external_table_on_your_file>> and then do a merge into the target table.
    http://www.oracle.com/technology/products/oracle9i/daily/sept19.html
    If you encounter any problems, please post the full description of your error.
    Thanks,
    Rajesh.
    Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.
    Always try to provide create table and insert statements to help the forum members help you better.

  • Calling a sequence in a new thread with different values

    I have a sequence that I want to call that runs in parallel (seperate thread). The question I have is that I want to run this sequence from a lot of different places, but with different values of the variables going into the steps inside the sequence.
    If I change the values inside the sequence (running on seperate thread), then I will have to duplicate this sequence over and over. What I really want to be able to do is run a step in a seperate thread, and not wait for it to complete. Is this possible? Or a method of passing step values into a seperate thread. I don't want to use globals unless I really have to.

    Hi ADL,
    I have attached an example which I hope will illustrate an answer to your question.
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    Sequence_File.seq ‏34 KB

  • How to read data with different XML schemas within the single connection?

    I have Oracle 11g database
    I access it through jdbc:oracle:thin, version 11.2.0.3, same as xdb.
    I have several tables, each has one XMLType column, all schema-based.
    There are three different XML schemata registered in the DB
    I may need to read the XML data from several tables.
    If all the XMLTypes have the same XML schema ,there is no problem,
    If the schemata are different, the second read throws BindXMLException.
    If I reset the connection between the reads of the XMLType column with different schemata, it works.
    The question is: how can I configure the driver, or the connection to be able to read the data with different XML schemata without resetting the connection (which is expensive).
    The code to get the XMLType data is textbook implementation:
    1   ResultSet resultSet = statement.executeQuery( sql ) ;
    2   String result = null ;
    3    while(resultSet.next()) {
    4   SQLXML sqlxml = resultSet.getSQLXML(1) ;
    5   result = sqlxml.getString() ;
    6   sqlxml.free();
    7   }
    8   resultSet.close();
    9    return result ;

    It turns out, that I needed to serialize the XML on the server and read it as Blob. Like this:
    1    final Statement statement = connection.createStatement() ;
    2    final String sql = String.format("select xmlserialize(content xml_content_column as blob encoding 'UTF-8') from %s where key='%s'", table, key ) ;
    3   ResultSet resultSet = statement.executeQuery( sql ) ;
    4   String result = null ;
    5    while(resultSet.next()) {
    6   Blob blob = resultSet.getBlob( 1 );
    7   InputStream inputStream = blob.getBinaryStream();
    8   result = new Scanner( inputStream ).useDelimiter( "\\A" ).next();
    9   inputStream.close();
    10   blob.free();
    11   }
    12   resultSet.close();
    13   statement.close();
    14
    15   System.out.println( result );
    16    return result ;
    17
    Then it works. Still, can't get it work with XMLType in resultset.On the client unwrapping XML blows up when trying to switch to different XML schema. JDBC/XDB problem?

Maybe you are looking for

  • HP Officejet Pro L7590 - printer cartridge door clasp broken

    The plastic clasp on my printer cartridge door broke. The printer thinks the door is open and will not print. What can I do?

  • Change page size in Acrobat

    I'm working on a newsletter in Acrobat that is 8.5x11, and I need to change the page size to 8.5x14 to fit all of the content and print the larger page. Is there any way to do this in Acrobat? Thanks.

  • Adobe premiere CC 2014 keeps on crashing when I try to quit the app

    Since I upgraded to CC 2014, Premiere (8.0.1) keeps on crashing every time I try to quit. I'm on a Mac Pro 3.33Ghz 6 core Intel XEON, 24GB RAM, NVIDIA QUADRO 4000 UP TO DATE GRAPHICS DRIVE (334.01.02f02). I have OS X Defalut Graphics Drive selected.

  • (Deployment) Minimum Software required for BUILD server and IIS WebServer

    We have a simple .Net SDK application written using VB-2005 and the Crystal Reports XI (R2) DEVELOPER package. The RPT files are posted on our BOE-XI (R2) server, and are called using the View-On-Demand method from the Page Server (similar to the SDK

  • Mail 2.1.3 Issue!

    I have suddenly experienced an issue with Mail (2.1.3) after years of problem free use. First, the text of messages from one sender are turning up in other senders' messages. Second, attachments are all showing up as "winmail.dat". And now, when I tr