Excluding records based on values

Hi all;
I have this datasource where there let's say there are several records with fields company code, costcenter, cost element, fiscal year, closing date etc. I need to select all records from that table excepts the ones which has the values on closing date. what I mean is I am not supposed to extract the records which has values on the closing date....how should I handle this scenarios...?

hi:
If the data source is a generic based on VIEW, you can add this in the selection Conditions:
Closing Date EQ " ".
NOTE: Use the FIELD name for CLosing Date.
Ram C.
Message was edited by: Ram Chamarthy
Message was edited by: Ram Chamarthy

Similar Messages

  • Can a subreport select records based on values in the main report record?

    Post Author: calvin
    CA Forum: General
    Perhaps my understanding of a subreport is incorrect as this is the first time I've used one, but it seems to me that the subreport should be able to use the values from the main report record in its (the subreport's) operations-but my subreport doesn't seem to be working that way.In my main report, I select a set of records from a 'request' table. I have a subreport in the detail section so the subreport is processed for each of the request records. That works, but I'm simply getting the same data reported multiple times. It's as if the subreport only uses the last request record rather than the current one. Stating it this way I can see that the problem might be evaluation time-it's processing the request records first, then processing the subreport, and only then printing everything. If this is correct then putting WhilePrintingRecords on the subreport should work-but the only way I know of to do that is in a formula. Can I call the subreport from a formula? Or am I totally off-track?Thanks.

    Post Author: foghat
    CA Forum: General
    Have you established a link(s) between your main report and subreport?When viewing the main report, click edit --> subreport links and link the 2 based on whatever values from the main report you want.

  • Selecting records based on value of field

    I have a table test with 10,000 records in it and 50 columns.
    I have to select those rows which contain values as "Sales Dum" in their field
    For table with small number of colums i did this
    SELECT * FROM tbl_website_dtl WHERE created_by like '%Sales%'
    or website_name like '%Sales%' or website_code like '%sales%';But should i do for table containing 50 columns.

    Hi,
    Use this procedure,
    CREATE OR REPLACE PACKAGE "GLOBALPKG" AUTHID CURRENT_USER AS
    TYPE RCT1 IS REF CURSOR;
    END GLOBALPKG;
    CREATE OR REPLACE PROCEDURE PL_SEARCH(IN_TABLE_NAME IN VARCHAR2,IN_SEARCH_STRING IN VARCHAR2,RC1 OUT GLOBALPKG.RCT1)
    IS
    V_MESSAGE VARCHAR2(255);
    V_STMT VARCHAR2(2000):='SELECT * FROM '||IN_TABLE_NAME||' WHERE ';
    BEGIN
    FOR R1 IN (SELECT * FROM user_tab_cols WHERE TABLE_NAME=IN_TABLE_NAME AND CHARACTER_SET_NAME='CHAR_CS')
    LOOP
    V_STMT:=V_STMT||' '||R1.COLUMN_NAME||' like ''%'||IN_SEARCH_STRING||'%'' AND ';
    END LOOP;
    V_STMT:=V_STMT||' 1=1';
    OPEN RC1 FOR V_STMT;
    EXCEPTION
    WHEN OTHERS THEN
    V_MESSAGE:=SUBSTR(SQLERRM,1,255);
    OPEN RC1 FOR SELECT V_MESSAGE FROM DUAL;
    END;

  • Need to set attribute of current record based on value in next record

    Using Forms 6, I have a form showing a list of records. There can be multiple records with the same ID but having different expiration dates. I need to set attributes to hilite only the record with the latest expiration date. The current list hilites the records with future expiration dates-but we've found that sometimes the subscription is renewed before the old expiration date has been reached, resulting in two records with the same ID having expiration dates in the future.
    I can (and do) sort the records by ID & expiration date so the record with the latest expiration date is always the last one for that ID, so what I want to do is check the next record to see whether or not it has a different ID. If it does then the current record has the latest expiration date & should be hilited. Since I might need to hilite the current record I can't simply navigate to the next record which, from the description I've found, is what the next_record builtin does. Does anybody know how I can check a value in the next record without making it the current record?
    Thanks.

    The database is 10g but I've never heard of the LEAD function before. Now that I've read about it it sounds like I can check the next record using the following:
    LEAD(ID,1,0) OVER (ORDER BY ID ASC) NEXT_ID
    But I'm not sure where to put this. Maybe create a control item & load the value in the POST-QUERY trigger? I'll give this a try but if you have a suggestion I'd be glad to hear it. Thanks. On second thought I don't think selecting the next ID in the POST-QUERY trigger would work as that would require a complete select statement which would start at the top of the list each time, I think.
    Bugger. I can do it in SQL-Plus but I can't see how to incorporate it into the form.
    Edited by: user6931915 on May 18, 2011 11:09 AM

  • When user clicks on the link ,it will display some record based on value

    Hi
    i want to create such a query/request in the Dashbord,when user click on it, it will open the other request in the same place based on the value it clicks.
    More detail idea about the question:
    for ex. i have created one query, which gives the following output.
    current_loan_amount Current_status
    now when user click the current_loan_amout ..........the detail page will be displayed.
    wchich will give the dettail about the Current_loan_amount.....like to whom the loan has been given,region,address,broker name etc..
    So if anybody knows anything about this.
    Guide me

    Yes you can create a navigate report where it displays the details for the amount user selected.
    You can enable navigation on the metric(column format-interation-navigate) and give the path of the other qyery.
    You just need to pass all the values that you need using "Is prompted" Filters.
    Hope it helps
    Prash

  • Query - Remove duplicate records based on value of  one field

    Hi,
    Pleae see the data below,
    how to remove records when its count 0
    AND those records (name ) repeat with count > 0
    existing data
    name                       loc                            count
    aaa          a1          10
    aaa          a1          0
    bbb          b1          0
    ccc          c1          0
    dcc          d1          11
    dcc          d1          0
    required output
    name                       loc                            count
    aaa          a1          10
    bbb          b1          0
    ccc          c1          0
    dcc          d1          11
    remove these records -
    aaa          a1          0
    dcc          d1          0Thanks.

    i assume that loc always corresponds to name. So to find the rows to remain is just a simple group by
    with data as(
    select 'aaa' name,'a1' loc,10 count from dual union all
    select 'aaa','a1',0 from dual union all
    select 'bbb','b1',0 from dual union all
    select 'ccc','c1',0 from dual union all
    select 'dcc','d1',11 from dual union all
    select 'dcc','d1',0 from dual )
    select
      name
    , loc
    , max(count) cnt
    from data
    group by
      name
    , loc
    order by
      name
    , loc
    NAME     LOC     CNT
    aaa     a1     10
    bbb     b1     0
    ccc     c1     0
    dcc     d1     11to find the other is just a minus
    with data as(
    select 'aaa' name,'a1' loc,10 count from dual union all
    select 'aaa','a1',0 from dual union all
    select 'bbb','b1',0 from dual union all
    select 'ccc','c1',0 from dual union all
    select 'dcc','d1',11 from dual union all
    select 'dcc','d1',0 from dual )
    select name,loc,count from data
    minus
    select
      name
    , loc
    , max(count) cnt
    from data
    group by
      name
    , loc
    order by
      name
    , loc
    NAME     LOC     COUNT
    aaa     a1     0
    dcc     d1     0so a delete would be
    delete from data
    where
    (name,loc,count)
    in
    (select name,loc,count from data
    minus ..regards

  • How to exclude records from infopackage

    Hi All,
    I am trying to exclude records based on characteristic(ZSCSF) value.I have written ABAP routine in infopackage.
        l_t_range-sign      = 'E'.
        l_t_range-option    = 'EQ'.
        l_t_range-low       = '0-3 CASE CARB MV TRB CUP'.
    During scheduling of infopackage i am getting below error message.
    For sel. field '/BIC/ZSCSF', no selection with SIGN = 'E'; OPTION 'EQ' allowed
    i am getting error message for below code too.
        l_t_range-sign      = 'I'.
        l_t_range-option    = 'NE'.
        l_t_range-low       = '0-3 CASE CARB MV TRB CUP'.
    I am only able to execute below selection.
        l_t_range-sign      = 'I'.
        l_t_range-option    = 'EQ'.
        l_t_range-low       = '0-3 CASE CARB MV TRB CUP'.
    Please suugest me can we exclude records in infopackage using type 6(ABAP routine).If yes,coule you please provide code.it will be great for me..
    Thanks in advance,
    Bandana.

    One suggestion is, you select all the options for characteristic(ZSCSF) values(if they are not many) from the source DSO.
    Remove the one which you want from internal table.
    And append the rest in the l_t_range table.
    But the best way is, to delete the records in the start routine.
    Thanks.

  • Exclude records with value 0 for calculated KF

    Hi, experts,
    How do I Exclude records with value 0 for calculated KF without using condition?  I'm using version 7
    Appreciate any help you can provide.
    Thank You!
    Alina

    Hi,
    We didn't understood ur requirement well.
    1) Lets say, you have 3 KF. and you are doing CKF1 and you don't want to show the records with Zero, In that case you can go with Zero Record Supression.
    2) If you want to try to delete only KF/CKF where there is zero, it won't work as others may have values in them and you may miss the whole record set in the report
    3) If the zero result is part of calculation, then please go ahead as explained above.
    Please explain clearly if this is what you have or is it different ?
    Regards,
    -S-

  • Insert value into a column based on value of another column

    Hi,
    I am trying to insert a value into a record based on a column in
    the record, using a trigger. The complication arises because
    the new value is selected from the same table. For example:
    SELECT COL1, COL2, COL3, COL4 from TABLE1
    I want to set COL2 and COL3 based on the value of COL4. And to
    get the value of COL2 and COL3, I will go back to TABLE1 and set
    the condition to TABLE1.COL1 = :NEW.COL4
    I cannot seem to execute the trigger as I get the message "ORA-
    04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
    see it" everytime.
    Is this the correct way to achieve what I wanted? Or is there
    another way?
    Appreciate your feedback. Thank you in advance.

    Hi,
    I am trying to insert a value into a record based on a column in
    the record, using a trigger. The complication arises because
    the new value is selected from the same table. For example:
    SELECT COL1, COL2, COL3, COL4 from TABLE1
    I want to set COL2 and COL3 based on the value of COL4. And to
    get the value of COL2 and COL3, I will go back to TABLE1 and set
    the condition to TABLE1.COL1 = :NEW.COL4
    I cannot seem to execute the trigger as I get the message "ORA-
    04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
    see it" everytime.
    Is this the correct way to achieve what I wanted? Or is there
    another way?
    Appreciate your feedback. Thank you in advance. I'm not sure what you mean when you insert a value into a
    record, but if you are setting a value in a column of the same
    record using a trigger, then it's easy.
    :new.COL2 := ....:new.COL4...
    :new.COL3 := ....:new.COL4...
    The trigger must be 'INSERT or UPDATE' and 'FOR EACH RECORD'.
    If you are setting a different record in the same table, the
    solution is much more difficult.

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • Calculate BED & relevant duties based on value @ PO for a particular vendor

    Dear experts,
    Is it possible to calculate excise duties and other relevant pricing elements at purchase order level based on VALUE and capture the same (part1 - MIGO and part11-J1IEX) for a PARTICULAR VENDOR INVOICE?
    The business process is like this. First we r receiving invoice from vendor and based on that we r creating PO and do other transaction activities.
    We r using ECC6.we r maintaining tax details through tax codes based on percentage and pricing procedure(TAXINJ) is activated and pricing elements are managed through cond.types(gross is value base and others are managed by %).
    I find difficulty to capture excise data (cin) through % in j1iex and manual value adjustment is tedious process for multiple line items.
    If it is possible, kindly suggest.
    Regards,
    Vimalan.

    This is nothing but Trading process...
                u will not know what amount of excise the vendor is passing on u..
    just follow the below steps
    hi
    create material master with HAWA material type..
    maintain material chapter id combination in J1ID
    create tax code with zero excise and some vat/cst in FTXP
    maintain condition records for tax code in FV11
    Assign tax code to company code in tax on goods movement
    create PO in ME21N with the tax code created.
    During MIGO change the base amount
    Base amount = Base amount(PO) - Excise(bed, ecess, secess)
    enter the bed ecess secess in excise item details
    In excise header tab click on additional data (pencil icon) there in miscellaneous tab check mrp indicator
    post the document.
    in MIRO change the base amount to base amount - excise.
    During Purchase the RG23 A reg will Update..
    During Sales RG1 willl update..

  • How to omit records based on a status code

    I am trying to select records based on a status 'N' or 'A' by a certain date as long as by the chosen date there is not another status given to the same course like 'D' or 'X'.
    Here are some sample data...
    CREATE TABLE #TEST
    (ID VARCHAR(7),
    COURSE VARCHAR(10),
    CURRENT_STATUS VARCHAR(1),
    STATUS_DATE DATETIME)
    INSERT INTO #TEST
    (ID, COURSE, CURRENT_STATUS, STATUS_DATE)
    VALUES
    ('0020541','AAAA-1000H', 'X', '2013-08-27 00:00:00.000'),
    ('0020541','AAAA-1000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','BBBB-2000H', 'D', '2013-11-04 00:00:00.000'),
    ('0020541','BBBB-2000H', 'N', '2013-08-27 00:00:00.000'),
    ('0020541','CCCC-3000H', 'D', '2013-09-11 00:00:00.000'),
    ('0020541','CCCC-3000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','DDDD-4000H', 'A', '2013-08-25 00:00:00.000'),
    ('0020541','EEEE-5000H', 'N', '2013-08-26 00:00:00.000')
    SELECT * FROM #TEST
    DROP TABLE #TEST
    If the query is to determine how many records with a status of N or A up to and incl August 26, 2013, I should see 4 records... AAAA-1000H, CCCC-3000H, DDDD-4000H, EEEE-5000H
    If the query is to determine how many records with a status of N or A up to and incl October 1, 2013, I should see 3 records... BBBB-2000H,  DDDD-4000H, EEEE-5000H
    ...and so on.
    Any help is appreciated.

    I am trying to select records based on a status 'N' or 'A' by a certain date as long as by the chosen date there is not another status given to the same course like 'D' or 'X'.
    Here are some sample data...
    CREATE TABLE #TEST
    (ID VARCHAR(7),
    COURSE VARCHAR(10),
    CURRENT_STATUS VARCHAR(1),
    STATUS_DATE DATETIME)
    INSERT INTO #TEST
    (ID, COURSE, CURRENT_STATUS, STATUS_DATE)
    VALUES
    ('0020541','AAAA-1000H', 'X', '2013-08-27 00:00:00.000'),
    ('0020541','AAAA-1000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','BBBB-2000H', 'D', '2013-11-04 00:00:00.000'),
    ('0020541','BBBB-2000H', 'N', '2013-08-27 00:00:00.000'),
    ('0020541','CCCC-3000H', 'D', '2013-09-11 00:00:00.000'),
    ('0020541','CCCC-3000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','DDDD-4000H', 'A', '2013-08-25 00:00:00.000'),
    ('0020541','EEEE-5000H', 'N', '2013-08-26 00:00:00.000')
    SELECT * FROM #TEST
    DROP TABLE #TEST
    If the query is to determine how many records with a status of N or A up to and incl August 26, 2013, I should see 4 records... AAAA-1000H, CCCC-3000H, DDDD-4000H, EEEE-5000H
    If the query is to determine how many records with a status of N or A up to and incl October 1, 2013, I should see 3 records... BBBB-2000H,  DDDD-4000H, EEEE-5000H
    ...and so on.
    Any help is appreciated.
    I guess I didn't understand your problem. Not sure if this might help you.
    SELECT * FROM #TEST
    where CURRENT_STATUS IN ('N','A') AND STATUS_DATE<='2013-08-26'
    AND STATUS_DATE NOT IN(Select STATUS_DATE from #test
    where CURRENT_STATUS IN ('D','X'))
    SELECT * FROM #TEST
    where CURRENT_STATUS IN ('N','A')
    AND STATUS_DATE<='2013-10-01'
    AND STATUS_DATE NOT IN(Select STATUS_DATE from #test
    where CURRENT_STATUS IN ('D','X'))
    - please mark correct answers

  • Select records based on criteria and update those records once read

    hi,
    I am very new to bpel and DB adapters.
    I have a requirement where in I need to query two tables to fetch some records and update these selected records with a new value for field to indicate that bpel has processed these records.
    Once I select these I needs the output to be mapped to the output variable.
    I am able to select the records based on criteria , but how will i lock these records so that these records do not get processed again. This should be a very simple usecase just that I am not aware.
    Thanks,
    Robin

    Once you have finished reading the records fire an update query , update some field in the table so that it does not get picked up next time.
    if you are using polling for picking up the records, then use logical delete scenario, refer....http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm#BABEEBIH

  • Select records based on the closest given time

    Dear SQL gurus,
    I have a table T1:
    Name Null? Type
    ID NOT NULL NUMBER(5)
    MOMENT NOT NULL DATE [DD.MM.YYYY HH24:MI]
    MEASUREMENT NOT NULL NUMBER(8,3)
    Example (ID, MOMENT, MEASUREMENT)
    -- START OF EXAMPLE --
    9380 18.11.2000 03:45 17.6
    9380 18.11.2000 04:30 17.3
    9380 18.11.2000 05:45 16.8
    9380 18.11.2000 06:15 16.8
    9380 18.11.2000 07:00 16.2
    9380 18.11.2000 07:30 16.2
    9380 18.11.2000 08:15 16
    9380 18.11.2000 08:45 15.7
    9380 18.11.2000 09:30 15.4
    9380 18.11.2000 10:00 15.4
    9380 18.11.2000 11:15 15.4
    9380 18.11.2000 11:45 15.4
    9380 18.11.2000 12:30 15.4
    9380 18.11.2000 13:00 15.4
    9380 18.11.2000 13:45 15.4
    --- END OF EXAMPLE --
    How to select records based on the:
    - time period specified by the day only [DD.MM.YYYY] - CONDITION 1
    - with values for 6AM only, and if not available, with values closest to 6AM - CONDITION 2
    (if the time gap in MOMENT field is too big, lets say > 5h then choose the average between the value before 6AM (ex. 4:15AM) and the value after the 6AM (ex. 9:45AM))
    CONDITION 1 (something like): moment between '01.01.2005' and '31.12.2004' - this is OK
    CONDITION 2: I do not know how to formulate, especially if 6AM value is not availabe, and I have to find the closest available value, or get the avergae from the two adjacent values.
    Maybe cursor magic??? Thanks a lot for your help.
    Rado

    About condition two, would the following select be of use to you? Picking the first record could be achived by rownum, analytic function, etc.
    WITH t1 AS (SELECT 9380 id, TO_DATE('18.11.2000 03:45', 'dd.mm.yyyy hh24:mi') moment,  17.6 measurement
                  FROM dual
                 UNION 
                SELECT 9380 id, TO_DATE('18.11.2000 04:30', 'dd.mm.yyyy hh24:mi') moment,  17.3 measurement
                  FROM dual
                 UNION
                SELECT 9380 id, TO_DATE('18.11.2000 05:45', 'dd.mm.yyyy hh24:mi') moment,  16.8 measurement
                  FROM dual
                 UNION
                SELECT 9380 id, TO_DATE('18.11.2000 06:15', 'dd.mm.yyyy hh24:mi') moment,  16.8 measurement
                  FROM dual
    SELECT id, moment, measurement, diff
      FROM (SELECT id, moment, measurement,
                   moment - TO_DATE(TO_CHAR(moment, 'dd.mm.yyyy ') || '06:00', 'dd.mm.yyyy hh24:mi') diff
              FROM t1
    ORDER BY abs(diff) asc, SIGN(diff) desc;
      C.

  • Delete duplicate records based on condition

    Hi Friends,
    I am scratching my head as how to select one record from a group of duplicate records based upon column condition.
    Let's say I have a table with following data :
    ID   START_DATE   END_DATE    ITEM_ID     MULT    RETAIL            |                      RETAIL / MULT
    1     10/17/2008   1/1/2009     83     3     7                 |                            2.3333
    2     10/17/2008   1/1/2009     83     2     4                 |                            2
    3     10/17/2008   1/1/2009     83     2     4                 |                            2
    4     10/31/2008   1/1/2009     89     3     6                 |                            2
    5     10/31/2008   1/1/2009     89     4     10                |                            2.5
    6     10/31/2008   1/1/2009     89     4     10                |                            2.5
    7     10/31/2008   1/1/2009     89     6     6                 |                            1
    8     10/17/2008   10/23/2008     124     3     6                 |                            2From the above records the rule to identify duplicates is based on START_DATE,+END_DATE+,+ITEM_ID+.
    Hence the duplicate sets are {1,2,3} and {4,5,6,7}.
    Now I want to keep one record from each duplicate set which has lowest value for retail/mult(retail divided by mult) and delete rest.
    So from the above table data, for duplicate set {1,2,3}, the min(retail/mult) is 2. But records 2 & 3 have same value i.e. 2
    In that case pick either of those records and delete the records 1,2 (or 3).
    All this while it was pretty straight forward for which I was using the below delete statement.
    DELETE FROM table_x a
          WHERE ROWID >
                   (SELECT MIN (ROWID)
                      FROM table_x b
                     WHERE a.ID = b.ID
                       AND a.start_date = b.start_date
                       AND a.end_date = b.end_date
                       AND a.item_id = b.item_id);Due to sudden requirement changes I need to change my SQL.
    So, experts please throw some light on how to get away from this hurdle.
    Thanks,
    Raj.

    Well, it was my mistake that I forgot to mention one more point in my earlier post.
    Sentinel,
    Your UPDATE perfectly works if I am updating only NEW_ID column.
    But I have to update the STATUS_ID as well for these duplicate records.
    ID   START_DATE   END_DATE    ITEM_ID     MULT    RETAIL    NEW_ID   STATUS_ID |   RETAIL / MULT
    1     10/17/2008   1/1/2009     83     3     7         2         1      |     2.3333
    2     10/17/2008   1/1/2009     83     2     4                                |     2
    3     10/17/2008   1/1/2009     83     2     4           2         1      |     2
    4     10/31/2008   1/1/2009     89     3     6           7         1      |     2
    5     10/31/2008   1/1/2009     89     4     10          7         1      |     2.5
    6     10/31/2008   1/1/2009     89     4     10          7         1      |     2.5
    7     10/31/2008   1/1/2009     89     6     6                            |     1
    8     10/17/2008   10/23/2008     124     3     6                            |     2So if I have to update the status_id then there must be a where clause in the update statement.
    WHERE ROW_NUM = 1
      AND t2.id != t1.id
      AND t2.START_DATE = t1.START_DATE
      AND t2.END_DATE = t1.END_DATE
      AND t2.ITEM_ID = t1.ITEM_IDInfact the entire where_ clause in the inner select statement must be in the update where clause, which makes it totally impossible as T2 is persistent only with in the first select statement.
    Any thoughts please ?
    I appreciate your efforts.
    Definitely this is a very good learning curve. In all my experience I was always writing straight forward Update statements but not like this one. Very interesting.
    Thanks,
    Raj.

Maybe you are looking for

  • Accept Button in Service Contract Quotations

    Hi Experts The requirement is to create any of the 2 different types of contracts as a follow up from service contract quotation. I have maintained both the contract types as follow up transactions of service contract quotation through copy control.

  • Report Margins.. Not saving in .REP file?

    dear all I create a report and setup its Paper Size, margins etc after selecting desired Printer. Then I run it and take prints, it prints according to my settings. But when I compile it (control T making .rep), the output of this .rep file is not ac

  • Problem with Directory Access

    Hi! I have a problem, I uninstall Directory Access by mistake and now I don't know how can I install it again. Any clues?

  • How to set Default value of a parameter  to display Current Date

    I need to display the Default value for my parameter 'As of Date' which is of datatype Date as Current Date[DD-MON-YYYY]. How can I do This??

  • Cannot add images to existing collection

    I cannot add images to an existing collection. When I am in the Library/navigator modus, and I grab one or more images, I can not drag them to an existing library. I do can however, drag an entire collection to a collection set, but that is not what