Soritng and inserting the rows of a bitset matrix....Brain teaser!!!

Initially, i have two bitset matrices:
1. temp_matrix:Initially, it has all the rows,say n, in the sorted order based on their cradinality.
2.Final_matrix:Intially, empty.
Operation being performed on the bitset matrice:
1. Take each row of temp_matrix and perform "and" operation of it with all the other rows underneath it.Take the second row and perform and operation with all the orther rows underneath it and repeat the same with all the other rows till u reach the n-1the row which will be "Anded" with nth row.
2."Anded" result of each of two rows has to be stored in the Final_matrix in a sorted order based on its cardinality.
For example: say at any instant Final_matrix had the following state:
{1}
{3}
{1,2,3}
{3,4,5,6}
{1,2,3,4,5,6}
And suppose i have to insert a new row say: {4} in it at 3rd position
How should i do that..i mean which sorting method will be time efficent and how should i implement it in terms of inserting a new row in the list with the issues of shifting the rows etc.
The datastructure i am using is BitSet to store the bits.
Any suggestions !!!

Can u tell me how to wrap the BitSet entries in the Linked Lists.
I am pasting snap shot of my code,if that helps:
for( i=0;i<count_bit_vector_global-n;i=i+n)
long initial=0;
initial= System.currentTimeMillis();
count_j=0;
for(int j=i;j<i+n;j++)
if(temp_vector1.get(j)==true)
result_row_vector.set(count_j);
else
result_row_vector.clear(count_j);
count_j++;
}/*End for j:Result row created*/
if(result_row_vector.cardinality()>num_one)
for(int k=(i+n);k<count_bit_vector_global;k=k+n)
check=0;
if((temp_vector1.get(i,i+n)).intersects(temp_vector1.get(k,k+n))==true)/*All result elements are not zero*/
count_j=0;
for(int j=i;j<i+n;j++)
if(temp_vector1.get(j)==true)
result_row_vector.set(count_j);
else
result_row_vector.clear(count_j);
count_j++;
result_row_vector.and(temp_vector1.get(k,k+n));
while(check<count_bit_vector)
if((result_row_vector.get(0,count_j)).equals(bit_vector1.get(check,check+n)))
flag=true;
s2=track_vector.get(check/n).toString();
s1= temp_track_vector.get(i/n).toString().concat(b).concat(temp_track_vector.get(k/n).toString());
track_vector.set(check/n,concat_string(s2,s1));
break;
else
flag=false;
     check=check+n;
}/*End while*/
In this code n decides the length of one row.U can see i am simulating a 1D BitSet as 2D BitSet matrix.
Do pay any heed to the track_vector.
But i will summarize what i am doing here.
Temp_vector1 is the initial bitset storing the original matrix.
bit_vector1 is the bitset storing the new "Anded" rows.
"i" decides which row will be compared to all the other rows after that.
"k" decides the rows which are after the row determined by "i".
I am taking the row decided by "i" and then store that in result_vector and then "And" it with the other rows decided by "k".
"count_bit_vector" tells the number of bit elements in temp_vector
"check" tells the position of the row in the bit_vector1 which is similer to the row obtained after "And" operation.
If i find the row i don't add it in the bit_vector1 but if its not there then it is added.
Right now, before rejecting a row i have to compare all the rows which are there in the bit_vector1 and that is taking time.

Similar Messages

  • In zfile how to insert the row (urgent)

    hello,
    i am making the zfile of standard programme, in that zfile how to insert the row for remarks, while making the zfile, in programme nothing is displaying i mean codes, how to identify and insert the row for remarks please explain at your earliest.
    thanks
    suja

    hello,
    thanks for your rely,
    again having the problem of while clicking the insert button, the insert button is not not accessing, insert button is not responding.
    Also i want to know the original programmes codes i have copy and paste the same in my zprogramme or what, please let me know after what i have to do.
    thanks
    suja

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • How can i open a DOC or TXT file and insert the data into table?

    How can i open a DOC or TXT file and insert the data into table?
    I have a doc file . the doc include some columns and some rows.(for example 'ID,Name,Date,...').
    I'd like open DOC file and I'd like insert them into the table with same columns.
    Thanks.

    Use the SQL*Loader utility or the UTL_FILE package.

  • Compare String in a table and insert the common values into a New table

    Hi all,
    Anyone has idea on how to compare a string value in a table.
    I have a Students Table with Student_id and Student_Subject_list columns as below.
    create table Students( Student_id number,
    Student_Subject_list varchar2(2000)
    INSERT INTO Students VALUES (1,'Math,Science,Arts,Music,Computers,Law,Business,Social,Language arts,History');
    INSERT INTO Students VALUES (2,'Math,Law,Business,Social,Language arts,History,Biotechnology,communication');
    INSERT INTO Students VALUES (3,'History,Spanish,French,Langage arts');
    INSERT INTO Students VALUES (4,'History,Maths,Science,Chemistry,English,Reading');
    INSERT INTO Students VALUES (5,'Math,Science,Arts,Music,Computer Programming,Language arts,History');
    INSERT INTO Students VALUES (6,'Finance,Stocks');
    output
    Student_id     Student_Subject_list
    1     Math,Science,Arts,Music,Computers,Law,Business,Social,Language arts,History
    2     Math,Law,Business,Social,Language arts,History,Biotechnology,communication
    3     History,Spanish,French,Langage arts
    4     History,Maths,Science,Chemistry,English,Reading
    5     Math,Science,Arts,Music,Computer Programming,Language arts,History
    6     Finance,Stocks
    I need help or some suggestion in write a query which can compare each row string value of Student_Subject_list columns and insert the
    common subjects into a new table(Matched_Subjects).The second table should have the below colums and data.
    create table Matched_Subjects(Student_id number,
    Matching_studesnt_id Number,
    Matched_Student_Subject varchar2(2000)
    INSERT INTO Matched_Subjects VALUES (1,2,'Math,Law,Business,Social,Language arts,History');
    INSERT INTO Matched_Subjects VALUES (1,3,'History,Langage arts');
    INSERT INTO Matched_Subjects VALUES (1,4,'History,Maths,Science');
    INSERT INTO Matched_Subjects VALUES (1,5,'Math,Science,Arts,Music,Language arts,History');
    INSERT INTO Matched_Subjects VALUES (2,3,'History,Langage arts');
    INSERT INTO Matched_Subjects VALUES (2,4,'History,Maths');
    INSERT INTO Matched_Subjects VALUES (2,5,'Math,Language arts,History');
    INSERT INTO Matched_Subjects VALUES (3,4,'History');
    INSERT INTO Matched_Subjects VALUES (3,5,'Language arts,History');
    INSERT INTO Matched_Subjects VALUES (4,5,'Math,Science');
    output:
    Student_id      Match_Student_id     Matched_Student_Subject
    1     2     Math,Law,Business,Social,Language arts,History
    1     3     History,Langage arts
    1     4     History,Maths,Science
    1     5     Math,Science,Arts,Music,Language arts,History
    2     3     History,Langage arts
    2     4     History,Maths
    2     5     Math,Language arts,History
    3     4     History
    3     5     Language arts,History
    4     5     Math,Science
    any help will be appreciated.
    Thanks.
    Edited by: user7988 on Sep 25, 2011 8:45 AM

    user7988 wrote:
    Is there an alternate approach to this without using xmlagg/xmlelement What Oracle version are you using? In 11.2 you can use LISTAGG:
    insert
      into Matched_Subjects
      with t as (
                 select  student_id,
                         column_value l,
                         regexp_substr(student_subject_list,'[^,]+',1,column_value) subject
                   from  students,
                         table(
                               cast(
                                    multiset(
                                             select  level
                                               from  dual
                                               connect by level <= length(regexp_replace(student_subject_list || ',','[^,]'))
                                    as sys.OdciNumberList
      select  t1.student_id,
              t2.student_id,
              listagg(t1.subject,',') within group(order by t1.l)
        from  t t1,
              t t2
        where t1.student_id < t2.student_id
          and t1.subject = t2.subject
        group by t1.student_id,
                 t2.student_id
    STUDENT_ID MATCHING_STUDESNT_ID MATCHED_STUDENT_SUBJECT
             1                    2 Math,Law,Business,Social,Language arts,History
             1                    3 Language arts,History
             1                    4 Science,History
             1                    5 Math,Science,Arts,Music,Language arts,History
             2                    3 Language arts,History
             2                    4 History
             2                    5 Math,Language arts,History
             3                    4 History
             3                    5 History,Language arts
             4                    5 History,Science
    10 rows selected.
    SQL> Prior to 11.2 you can create your own string aggregation function STRAGG - there are plenty of example on this forum. Or use hierarchical query:
    insert
      into Matched_Subjects
      with t1 as (
                  select  student_id,
                          column_value l,
                          regexp_substr(student_subject_list,'[^,]+',1,column_value) subject
                    from  students,
                          table(
                                cast(
                                     multiset(
                                              select  level
                                                from  dual
                                                connect by level <= length(regexp_replace(student_subject_list || ',','[^,]'))
                                     as sys.OdciNumberList
           t2 as (
                  select  t1.student_id student_id1,
                          t2.student_id student_id2,
                          t1.subject,
                          row_number() over(partition by t1.student_id,t2.student_id order by t1.l) rn
                    from  t1,
                          t1 t2
                    where t1.student_id < t2.student_id
                      and t1.subject = t2.subject
      select  student_id1,
              student_id2,
              ltrim(sys_connect_by_path(subject,','),',') MATCHED_STUDENT_SUBJECT
        from  t2
        where connect_by_isleaf = 1
        start with rn = 1
        connect by student_id1 = prior student_id1
               and student_id2 = prior student_id2
               and rn = prior rn + 1
    STUDENT_ID MATCHING_STUDESNT_ID MATCHED_STUDENT_SUBJECT
             1                    2 Math,Law,Business,Social,Language arts,History
             1                    3 Language arts,History
             1                    4 Science,History
             1                    5 Math,Science,Arts,Music,Language arts,History
             2                    3 Language arts,History
             2                    4 History
             2                    5 Math,Language arts,History
             3                    4 History
             3                    5 History,Language arts
             4                    5 History,Science
    10 rows selected.SY.

  • Error: cannot commit (when inserting the row)

    hai,
    I create the trigger like below.
    create or replace trigger proce
    after insert on samp3
    declare
    ass date;
    begin
    select d into ass from samp3;
    updatecourse(ass);
    end;
    when I try to insert the row then the error is come;
    ERROR at line 1:
    ORA-20001: An error was encountered - -4092 -ERROR- ORA-04092: cannot COMMIT in a trigger
    ORA-06512: at "AUROLIVE.UPDATECOURSE", line 22
    ORA-06512: at "AUROLIVE.PROCE", line 5
    ORA-04088: error during execution of trigger 'AUROLIVE.PROCE'
    can any one help me?
    Regards,
    Ramya.S

    If u want to put commit on trigger use pragma
    autonomous_transaction.what it does,it leave the main
    transaction and commit the second transaction.Which can lead to logic problems and corruption of your business data if not used extremely carefully.
    If you start transaction 1 and during that write some other data as transaction 2 using autonomous transactions and then subsequently find that there is an error or some reason not to commit transaction 1 then you cannot automatically roll back transaction 2 and would have to take care of it manually.
    I see too many occurences of developers using autonomous transaction all over the place just because they want to get the data written to the database and then they're wondering why there is so much clutter in their data and the database integrity is poor from a business/logical point of view. The first thing any good design includes is a knowledge of the business transactions and when data should be committed and what the implications of using autonomous transactions are.

  • Insert the row in "navigatedOutRow" event method...

    Hi guys,
    I want to insert the row to the database
    when user drop down to another row in Grid Control. I added
    myNavBar.doClick(NavigationBar.BUTTON_INSERT);
    to the detailGrid_navigatedOutRow even method.
    but it doesn't work for me. Do i am wrong way?
    (where myNavBar is an object of NevagationBar and detailGrid is an object of GridControl).
    null

    Ali, how did you implement the myGirdRS.isDirty() function? It seems the _isDirty from navigationbar source code returns the value based on the entire sessionInfo. So when you have a pending transaction then open up a reference window to look up a value, when you close the reference window, the isDirty returns true? which is not true for the case of the reference window at all, any help???                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How do I remove the cover to access the back of my 5c and insert the sim

    How do I remove the cover of my 5c in order to access the back of the phone to insert the sim?

    You DON'T remove the cover to access and insert the sim card in the the phone.
    The sim card tray on an iPhone is either at the top of the phone or on the side of the phone - just look at the top and then use the sim card tool that came with your phone and this will open the sim card tray.  You have no need to take the back off your phone whatsoever and has already been pointed out, if you do so, you warranty is voided, as the casing of iPhones are NOT designed to be removed.

  • To retrieve the PRT document (a PDF file) and insert the doc in PM order

    Hello guys,
    I have a challenging task in from printing as follows,
    By using TC: IW3D we get print preview of PM Order Set (PM Print Program: YIPRJT01), currently the PRT document number prints in the PM Order. Now we have to insert the PRT documents (a PDF file) into the PM Order set rather than printing the PRT document number ( By using TC: IW33 by going OPERTIONAL TAB we will get the PRT document(a PDF file))
    The requirement is to retrieve the PRT document (a PDF file) and insert the document in PM  order set with out navigating separately by using the TC: IW33.
    If you run the script in the print preview we can able to see PM the order set along with the PRT document (a PDF file).
    Thanks & Regards
    Vishnu

    I'm also trying to print PRT document with shop papers and still not able to do so. I selected "P" for print on the control key and it should print but still didn't print.
    If I understand it right, I think you are trying to do the same.
    Have you resolved this issue ?
    Thank you,
    Sam

  • I need assistance in burning an imovie to a DVD.  I've done this before, but am having problems this go around.  When I get to the import section and insert the blank dvd it runs a few seconds and ejects it.  Any ideas?

    I am struggling with getting the imovie I just created to burn onto a DVD.  I have done this before, I'm following the tutorial for imovie '09 and it isn't working after several attempts.  Any suggestions?  When I get to the import phase and insert the blank dvd it runs a few seconds and then spits it out. 

    tomc1965 wrote:
    I bought a 47LA6200 TV and a BP530 blue ray player. I have my cable box hooked up to HDMI 1, I have my blue ray hooked up to HDMI 2, and my XBox 360 to HDMI 3. I have my cable box hooked up to my older JVC RX880V stereo digital optical to digital optical without any 5.1 problems at all.
    My TV digital optical out is hooked up to my stereo digital optical port 2 without any 5.1 problems either, sort of.
    My BP530 is hooked up to my stereo digital coax to digital coax but I cannot get any 5.1 sound at all. Not through any of the digital channels on the stereo at all.
    The player only comes through as standard stereo through all 4 speakers and I am not sure if it is coming through the base speaker at all.
    I have tried every setting on both the TV and the blue ray player to no avail. I have even tried to not use the digital on my blue ray but when the stereo is set to play from my tv optical I still don't get 5.1 sound.
    When I do not use the TV optical out but I do use the digital coax out from the DVD player I still cannot play my DVDs in 5.1. I have new HDMI 15gbps HDMI cables and a new digital coaxial cable so I don't think it is a cable thing.
    The real question is how do I get to hear my blue ray and DVD discs in 5.1 sound? Will this work if I exchange my blue ray player for a Denon 3D blue ray or other player?

  • Search in Nested Tables and Insert the result into new Nested Table!

    How can I search in Nested Tables ex: (pr_travel_date_range,pr_bo_arr) using the SQL below and insert the result into a new Nested Table: ex:g_splited_range_arr.
    Here are the DDL and DML SQLs;
    Don't worry about the NUMBER( 8 )
    CREATE OR REPLACE TYPE DATE_RANGE IS OBJECT ( start_date NUMBER( 8 ), end_date NUMBER( 8 ) );
    CREATE OR REPLACE TYPE DATE_RANGE_ARR IS TABLE OF DATE_RANGE;
    DECLARE
       g_splited_range_arr   DATE_RANGE_ARR := DATE_RANGE_ARR( );
       g_travel_range        DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
       g_bo_arr              DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
       FUNCTION split_date_sql( pr_travel_date_range    DATE_RANGE,
                                pr_bo_arr               DATE_RANGE_ARR )
          RETURN DATE_RANGE_ARR
       IS
          l_splited_range_arr   DATE_RANGE_ARR;
       BEGIN
          SELECT start_date, end_date
            INTO l_splited_range_arr(start_date, end_date)
            FROM (WITH all_dates
                          AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
                              UNION ALL
                              SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
                              UNION ALL
                              SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
                              UNION ALL
                              SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
                       got_analytics
                          AS (SELECT a_date AS start_date,
                                     LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
                                     SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
                                FROM all_dates)
                    SELECT start_date, end_date
                      FROM got_analytics
                     WHERE black_out_cnt = 0 AND start_date < end_date
                  ORDER BY start_date);
          RETURN l_splited_range_arr;
       END;
    BEGIN
        g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
        FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP       
            DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-'  || g_splited_range_arr(index_g_splited_range_arr).end_date );
        END LOOP;
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          NULL;
       WHEN OTHERS
       THEN
          NULL;
    END;Or can I create a VIEW with parameters of Nested Tables in it so I can simply call
    SELECT  *
      BULK COLLECT INTO g_splited_range_arr
      FROM view_split_date(g_travel_range,g_bo_arr);

    @riedelme
    For your questions:
    1) I don't want to store in the database as a nested table
    2) I don't want to retrieve data from the database. Data will come from function split_date() parameter and data will be processed in the function and function will return it in nested table format. For more detail please look at the raw function SQL.
    I have a SQL like:
    WITH all_dates
            AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM travel
                UNION ALL
                SELECT tr_end_date, 0 FROM travel
                UNION ALL
                SELECT bo_start_date - 1, 1 FROM black_out_dates
                UNION ALL
                SELECT bo_end_date + 1, -1 FROM black_out_dates),
         got_analytics
            AS (SELECT a_date AS start_date,
                       LEAD( a_date ) OVER (ORDER BY a_date, black_out_val)
                          AS end_date,
                       SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val)
                          AS black_out_cnt
                  FROM all_dates)
      SELECT start_date, end_date
        FROM got_analytics
       WHERE black_out_cnt = 0 AND start_date < end_date
    ORDER BY start_date;I want to change the tables black_out_dates and travel to Nested Array so I can use it in a function with Nested Array travel and Nested Array black_out_dates parameters and the function will return Nested Array of date ranges.
    Here is what I want in raw SQL:
        DECLARE
           g_splited_range_arr   DATE_RANGE_ARR := DATE_RANGE_ARR( );
           g_travel_range        DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
           g_bo_arr              DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
           FUNCTION split_date_sql( pr_travel_date_range    DATE_RANGE,
                                    pr_bo_arr               DATE_RANGE_ARR )
              RETURN DATE_RANGE_ARR
           IS
              l_splited_range_arr   DATE_RANGE_ARR;
           BEGIN
              SELECT start_date, end_date
                INTO l_splited_range_arr(start_date, end_date)
                FROM (WITH all_dates
                              AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
                                  UNION ALL
                                  SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
                                  UNION ALL
                                  SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
                                  UNION ALL
                                  SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
                           got_analytics
                              AS (SELECT a_date AS start_date,
                                         LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
                                         SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
                                    FROM all_dates)
                        SELECT start_date, end_date
                          FROM got_analytics
                         WHERE black_out_cnt = 0 AND start_date < end_date
                      ORDER BY start_date);
              RETURN l_splited_range_arr;
           END;
        BEGIN
            g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
            FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP       
                DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-'  || g_splited_range_arr(index_g_splited_range_arr).end_date );
            END LOOP;
        EXCEPTION
           WHEN NO_DATA_FOUND
           THEN
              NULL;
           WHEN OTHERS
           THEN
              NULL;
        END;I must change the tables black_out_dates and travel in a way so it will be something like
    FROM TABLE( pr_travel_date_range )to get the result into l_splited_range_arr so it will be something like
              SELECT start_date, end_date
                INTO l_splited_range_arr(start_date, end_date)
                FROM (

  • How to update and insert the records without using Table_comparison and Map_operation?

    How to update and insert the records without using Table_comparison and Map_operation?

    Use either join or MERGE see this Inserting, Updating, and Deleting Data by Using MERGE

  • Call the database table on commit operation and fetch the rows

    Hi
    I am new to Bpel. I have a task to call the database table on commit operation and fetch the rows and call a webservice iteratively for fetching the data into a file?
    Can anybody help me on this
    Thanks and regards
    Richa

    HI,
    update ZYBKP set MATNR = <b>zcore_2-ZDUMMY</b> where matnr = <b>zcore_2-ZDUMMY</b>.
    update ZY310 set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
    update ZYBCS_LOT set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
    <b>YOU ARE COMPARING SAME MATERIAL AND UPDATING WITH THE SAME..</b> AND ALSO ZCORE_2 IS A DATABASE TABLE AND MAY NOT CONTAIN ANY VALUE AT THAT POINT...
    in these statments you say that
    update table set matnr = 'MATNR' WHERE MATNR = 'MATNR'.
    EVEN THOUGH THIS STATMENT IS EXECUTED THERE WILL NOT BE ANY CHANGE IN THE TABLE...
    Thanks,
    Mahesh

  • How to Insert the row in the View object

    I want to insert the row in the view object by instantiating Impl.java file
    Could someone please let me know how to insert the blank row
    Thanks

    Inserting onto a view object should be done the following way:
    //vo is your view object
    Row aRow = vo.createRow();
    //Set your attributes
    aRow.setAttribute("AttributeName", objectValue);
    //insert
    vo.insertRow(aRow);
    That should work for you if you are programming the input. If you are using java components bound to columns in a view object then the input should be done automatically for you when you commit.

  • I forget my password and inserted the instalation cd and now It doesnt work

    I forget my password of my MacBook Pro and inserted the instalation cd to recover It and now It does not work what can I do

    Which model Macbook Pro do you have? 
    It is very difficult to offer troubleshooting suggestions when the "os version" you are using is unknown as each os has their own troubleshooting solutions.  
    Please describe in detail all you have attempted to do in order to resolve the issue.  Need details on what happens when you try to boot up from your install disc.  Was it the disc that originally came with your computer? 

Maybe you are looking for