Report query to exclude entries from the list.

ID R_Number Status_ID Date Setup_by
12 1111 2 11/11/2006 m
23 2222 4 11/11/2006 m
54 1111 3 11/12/2006 m
54 1111 5 11/11/2006 m
876 3333 2 11/13/2006 m
89 4444 4 11/11/2006 m
33 2222 2 11/14/2006 m
How can I select the R_number where status_id ‘2’ exist but not status_id ‘4’ (If one r_number has both status_id ‘2’ and ‘4’, it should not pick that number)
I tried the query below but it seems to be returning the r_number (S) where it has either 2 or 4 status_id.
Select r_number, status_id
From table1
Where status_id = ‘2’
And status_id != ‘4’
so that it should be picking r_number (s) - 1111, 3333 only
Please help me out. Thank you. Rav.

Well, this is really a SQL question, not an ApEx question, but here goes....
Your query would return r_number and status_id from any record that contains a status_id of 2 and not 4. Well, if it's 2, it can't be 4, so it's really returning any record where status_id is 2, which would be rows with ID 12, 876, and 33. What I think you want is a query where you find a status_id of 2 and no other record in the database has the same r_number only with a status_id of 4.
Try
select r_number, status_id from table1
where status_id = '2'
and r_number not in (select r_number from table1 where status_id = '4')
This works, but may not be the most efficient query.

Similar Messages

  • HOWTO remove an entry from the node list...

    Hi all,
    does anybody know, howto remove an entry from the node list TAB ?
    I recentyl updated my system to 11.5.10.2 including enabling autoconfig.
    Now, concurrent processes won't start, because of two entries in the node list tab (yes, it's a single node installation!). There are two entries, one with the IP-address and one with the hostname.
    Can somebody tell me howto remove this obsolete entry?
    Thanks.

    1) Login as APPS user to SQL*Plus
    2) Issue the following:
    SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
    SQL> COMMIT;3) Run AutoConfig
    For more details, please refer to:
    Note: 260887.1 - Steps to Clean Nonexistent Nodes or IP Addresses from FND_NODES
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=260887.1

  • How to get multiple values from the list

    I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
    <%     // clicked on Select District Button
    Vector vselectedDistrict = new Vector();
    Vector vdistrictID = new Vector();
    String tmpSelectDistrict = "";
    tmpSelectDistrict = request.getParameter("bSelectDistrict");
    if(tmpSelectDistrict != null)
         // get multiple values from the list
         String[] selectedDistrict = request.getParameterValues("usrTDistrict");
         vselectedDistrict.clear();
         vdistrictID.clear();
         if((selectedDistrict != null) && (selectedDistrict.length != 0))
                             for(int i=0;i<selectedDistrict.length;i++)
                   vselectedDistrict.addElement(selectedDistrict);           
              vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
              for(int i=0;i<vdistrictID.size();i++)
                   out.println("district = " + selectedDistrict[i]);                         out.println("district ID= " + vdistrictID.get(i).toString());
    %>
    // get vdistrict from the database here......
    <select name="usrTDistrict" size="5" multiple>
    <%     for(int i = 0; i< vdistrict.size(); i++)
    %>
         <option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
    <%
    %>          
    </select>
    <input type="submit" name="bSelectDistrict" value="Select District">
    Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
    what I got is this error message:
    org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    So where is going wrong and what the message means?. Any help very much appreciated. Thanks

    These are just guesses that might hopefully steer you in directions you haven't looked in yet.
    I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
    Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
    expects a Vector as its second parameter? And returns a Vector?
    I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector?

  • Please add a date/time stamp to each entry in the list of sites with accepted/blocked cookies.

    It would make it easier to find which site it is that I just blocked, that now prevents me from loading the page. (ConOps: Go to list. Sort by date/time. Delete all entries from the past few minutes.)

    You can see all permissions including for cookies for the current tab on the "Tools > Page Info > Permissions" window.

  • LOV default value from the list of choices

    How Do I set the default value of an LOV to be something selected from the list of choices? It's the first item returned, if that helps.

    I'm populating it with a query, and it populates fine.
    select to_char(jobno)||' - '||jobdes d, jobno r
    from [email protected]
    where jobno != 10000
    union all
    select '1000000 - Non Chargeable' d, '00000' r
    from dual
    order by 1;
    It sets up the 1000000 numbered job to be first, but it sets the default to null.
    I tried setting source to be populated by SQL query, and I use this to populate it
    select '1000000 - Non Chargeable' d, '00000' r
    from dual;
    but it doesn't work correctly, and when I submit it it tells me incorrect number.

  • LOV not validating from the list when tabbed out

    Hi,
    I have an item attached to an LOV generated dynamically based on another LOV. When I change the value in the parent LOV, and just click on the child item(which still has old value) and tab out, it does not validate from the list which has new values. The old value in the field is actually wrong one. However, it shows new values when I click on list of values for the child item.
    I am also setting the property VALIDATE_FROM_LIST to PROPERTY_TRUE. The code to set_lov_property to the dynamic query is generic and is used by both key-listval and when-new-item-instance triggers. Except in key-listval I added list_values.
    I am using forms 6i version.
    Can any one tell me where I am doing wrong?
    Thanks,

    Neeraja,
    Its because the item is not validating again, as there is no change in its contents. So you have to tell oracle to validate that item. For that in the WHEN_VALIDATE_ITEM trigger of the parent item, write,
    SET_ITEM_PROPERTY('<block_name>.<child_item_name>', ITEM_IS_VALID, PROPERTY_FALSE);So when you tab out from the child item, the oracle will validate that item even if there is no change in the data.
    Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • How to limit provisioning task to a batch of entries from the queue

    Hi Folks,
    In our IDM system we have 60000 entries sitting in the provisioning queue for a single repository for a single task. The provisioning task handles such amount of entries very slow working for days.
    I'm wondering if it's possible to limit somehow the provisioning task to a certain batch of entries from the queue. Let say, to force somehow the provisioning task to handle TOP 1000 entries at once and then finish. In such a way it will start multiple times to process the 60000 entries, but each iteration of the task will not longer than 1000 entries.
    I have the idea to overwrite the default view MXPROV_ENTRIES for the task to return top 1000 entries only. Do you think this will work ?
    Any other ideas please welcome.
    Thank you a lot!
    Siarhei

    Hi,
    You don't mention what kind of task it is queued for, or perhaps it's even an action? Or the IdM version for that matter. I'm not sure how changing the views would change anything though.
    In case it's a task (ordered, condt., switch etc) the dispatcher has for the latest versions been using the views mxpv_grouptasks_ordered/switch/conditional which already have 1000 row limiters in them.
    If it's an action then the runtime should not be much affected by the size or really care how many are in the mxprov_entries view. It might take a few seconds to get the entire list og 60.000 rows if it doesn't add it's own limitation in addition to the action/repid filter. If they're all for the same actionid/repository combination it will just works through it one entry at a time untill it's done and each entry is enclosed in its own transaction so at this point there would be no effect of having a top 1000 or not It's also not possible to split up the queue action/repository combination between multiple runtimes either.
    Br,
    Per Christian

  • Last day from the list of dates

    i have a query which give me list of dates. From these list of date i want to find the last day in all months. when i am using last day fucntion i am getting last day from the sysdate and not from the list of dates generated by my query.
    the query
    (select distinct to_date(substr(batch_id,1,6),'DDMMRR') batch_id from gcon_mst_v0)
    order by batch_id desc
    i want last day from each month from the list of dates listed from the query.
    Help would be higly appriciated
    Thanks in advance

    The column is a varchar but i am convering it to get
    the list od dates as you can see in the query. i want
    all the last dates of every month from that list of
    dates for eg. below is the list of the dates i am
    getting from the query.
    7/11/2007
    7/10/2007
    7/9/2007
    7/8/2007
    7/6/2007
    7/5/2007
    7/4/2007
    7/3/2007
    7/2/2007
    7/1/2007
    6/29/2007
    6/28/2007
    6/27/2007
    6/26/2007
    6/25/2007
    6/24/2007
    6/22/2007
    6/21/2007
    6/20/2007
    6/19/2007
    6/18/2007
    6/17/2007
    6/15/2007
    6/14/2007
    6/13/2007
    6/12/2007
    6/11/2007
    6/10/2007
    6/8/2007
    6/7/2007
    6/6/2007
    6/5/2007
    6/4/2007
    6/3/2007
    6/1/2007
    5/31/2007
    5/30/2007
    5/29/2007
    5/28/2007
    5/27/2007
    5/25/2007
    5/24/2007
    5/23/2007
    5/22/2007
    5/21/2007
    5/20/2007
    5/18/2007
    5/17/2007
    5/16/2007
    5/15/2007
    5/14/2007
    5/13/2007
    5/11/2007
    5/10/2007
    5/9/2007
    5/8/2007
    5/7/2007
    5/6/2007
    5/4/2007
    5/3/2007
    5/2/2007
    5/1/2007
    4/30/2007
    4/29/2007
    4/27/2007
    4/26/2007
    4/25/2007
    4/24/2007
    4/23/2007
    4/22/2007
    4/20/2007
    4/19/2007
    4/18/2007
    4/17/2007
    4/16/2007
    4/15/2007
    4/14/2007
    4/12/2007
    4/11/2007
    4/10/2007
    4/9/2007
    4/8/2007
    4/6/2007
    4/5/2007
    4/4/2007
    4/3/2007
    4/2/2007
    4/1/2007
    3/30/2007
    3/29/2007
    3/28/2007
    3/27/2007
    3/26/2007
    i want the last date for all the months listed. that
    would be
    6/29/2007 -- last day for june
    5/31/2007-- last day for may
    4/30/2007-- last day for april
    3/30/2007-- last day for march and so on
    thankswrite query as
    SELECT LAST_DAY(TO_DATE(SUBSTR(COLUMN_NAME,X),'MM/DD/YYYY'))
    FROM TABLE_NAME

  • When I delete a podcast, it immediately reappears with the icloud next to it.  How do I delete it from the list?

    What's deal?  When I delete a podcast, it immediately reappears with the icloud next to it.  How do I delete it from the list so that it stays gone?  I only want unplayed episodes.  I have tried all aspects of preferences but this does nothing to help.  I couldn't even delete an episode until I downloaded it, so I thought.  After the downloads, I deleted it only to have it reappear with the iCloud icon next to it.....Thanks for any help! 

    What is reappearing is just the list entry with the indication that it is available for download - it's not taking up any space on your computer. You can remove it by control- or right-clicking it and choosing 'delete'.
    The recent changes in iTunes have confused a lot of people. Here is a summary of the situation:
    Only the most recent episode shows when you first subscribe. In the default  'My Podcasts' view click 'Old episodes' to show earlier episodes, click 'Done' to hide them or 'Add all' to keep them there and also add them to List view.
    Alternatively, in 'List' view control- or right-click on the name of the podcast or the episode and choose 'Show old episodes' to reveal all the previous episodes.
    In both views you can now delete both downloaded or un-downloaded episodes from both views by control- or right-clicking on the name of the episode.
    In both views each episode now has a blue circle to the left showing it as unplayed. Each episode can be double-clicked to be played as a stream without downloading it first (so you don't have to wait for it to download fully). Click the cloud icon at right to download it (as you will have to to sync it to an iPod). Note that if you click the cloud icon to the right of the title of the podcast itself, rather than an episode, you will initiate a download of all episodes.

  • Enabling a reports region when a item from a list is picked up.

    Hello,
    Can you help me with this ..
    I have 2 regions on the page 1. will have a select list .. when an item is picked from the list i want to automatically enable the region with report displaying the database records that matches the select pattern
    Thanks in Advance
    -Vasu

    Hi Vasu,
    This depends on what you mean by "matches the select pattern".
    Do you mean that the select list is, effectively, a filter - the user picks one of two reports from the select list and it is then displayed?
    If so, you should have a Select List with Submit. The select list item and its values would then be used as the Conditional Display settings for both reports.
    Regards
    Andy

  • How do you hide Excluded Roles from the End User (8.1) ?

    We have 2 Buisness Roles: Employee and Contractor. They are excluded from each other, meaning if you have one of the roles, you cannot be assigned the other role.
    When a user logs into 8.1 to the OOTB "Update My Roles" WF, they see their Available Roles for selection.
    These available roles listing includes the excluded roles.
    So when a user with the Contractor role logs in, they see the Employee role as an available role.
    If the Contractor user tries to add the Employee role, they will get an error due to the role exclusion.
    I know it is possible to hide the excluded roles from the end user, but don't know how.
    Does anyone know how to hide the excluded roles from users?
    Thanks.

    Hi
    I may have misread your first comment but I totally agree with your response.
    If the user has capabilities over multiple organizations it will show all roles, whether exclusion or not. (Been confirmed that this is how it is designed to work)
    What could be done is when selecting a user is a specific organization, you could have a rule that only shows up the Business roles that are associated with that organization. So although you have the capabilities over all organizations you only see the roles that are available to the organization where the user is your are updating.
    An idea anyway
    Ian

  • TS2198 ical (the calendar program) that came with this apple mac pc suddenly stopped working, then disappeared from the computer, from the desktop where I have been using it for the past two years, without trouble, then from the list of applications. . .

    ical (the calendar program) that came with this apple mac pc suddenly stopped working. When I pulled the icon from the desktop, it then disappeared from the computer.I have been using it from the desktop for the past two years, without trouble. It has uninstalled itself, without my intervention and has eradicated all traces of it, including all my entries from the computer memory. There is no program in the applications list. Can you say why this may have happened please?

    I opened one of the .calendar folders. There was a folder named Events which had either one or some files ending .ics. I opened several of these, which put up a dialogue window showing some parameters with data strings attached as follows :-
    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Apple Inc.//iCal 4.0.4//EN
    CALSCALE:GREGORIAN
    BEGIN:VEVENT
    CREATED:20110824T070048Z
    UID:6AAAB8A2-64C7-4E88-8E5E-46A4D1036544
    DTEND;TZID=Europe/London:20110824T104500
    TRANSP:OPAQUE
    SUMMARY:Try to avoid general urticaria triggers such as stress\, alcohol
    \, aspirin\, hot baths\, rapid temperature changes\, tight clothing and
    junk or processed foods containing sulphur dioxide\, sodium benzoate\, s
    alicylate and tartrazine.\n\nAvoid tomatoes\, strawberries\, strong chee
    se\, dark fish and fermented foods.
    DTSTART;TZID=Europe/London:20110824T094500
    DTSTAMP:20110824T070102Z
    X-APPLE-EWS-BUSYSTATUS:BUSY
    SEQUENCE:2
    END:VEVENT
    END:VCALENDAR

  • Delete file from the list & as well as from file upload

    I have come across a situation where there is a sap.ui.unified.FileUploader & user is free to upload as many file selected. then there is a button to display the list of added files as list(deleteable list). list delete is possible by using the standard function provided in the explored of SAP UI5 SDK document. but how to bind both the controls?? do that at the time of deleting the list it will also delete the files added in FileUploader. attaching the screenshot for better understanding...
    SAP UI5 Version 1.24.3

    Hi,
    you can use the setValue() method when you delete a file from the list:
    oFileUploader.setValue("");
    Kind regards,
    RW

  • Delete file from the list.

    How can I delete the PDF from the list.

    See the FAQ: http://learn.adobe.com/wiki/display/readermobile/iOS+FAQ

  • The problem here is i am not able to get the data from the list

    hi all,
    i have the following code
    EnrichedProductCatalogue enrichedProductCatalogue1 = new EnrichedProductCatalogue();
    enrichedProductCatalogue1.setAssetCount(2);
    enrichedProductCatalogue1.setBlockingProduct("Weekend Freebee");
    enrichedProductCatalogue1.setBlockingReason("Compatability");
    ArrayList<String> availableActionsList = new ArrayList<String>();
    availableActionsList.add(EnrichedProductConstants.ADD.toString());
    availableActionsList.add(EnrichedProductConstants.REMOVE.toString());
    enrichedProductCatalogue1.setAvailaibleActions((ArrayList<String>)availableActionsList);
    BundleProduct bundleProduct = null;
    Product product = new Product();
    product = new Product();
    product.setProductName("International");
    product.setProductClassName("International");
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);
    bundleProduct = new BundleProduct();
    bundleProduct.setCommercialProduct(product);
    enrichedProductCatalogue1.setBundleProduct(bundleProduct);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    here i have an list called listOfEnrichProducts.
    here i am adding two objects of enrichedProductCatalogue.
    which contains a object called BundleProduct.
    which has a reference for Product class.
    here this product class has a list which contains objects of another class called UiCategory.
    the problem here is i am not able to get the data from the list which contains UiCategory objects .
    the following is the UI
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{pageFlowScope.sample1}"
    binding="#{pageFlowScope.sampleManagedBean.dataTable}"
    partialTriggers="apimethods ::apimethods">
    <af:column sortable="false" headerText="ProductName" id="c2">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productName}" id="ot15"/>
    </af:column>
    <af:column sortable="false" headerText="ProductClass" id="c12">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productClassName}" id="ot19"/>
    </af:column>
    <!--
    <af:column sortable="false" headerText="UICategoryName" id="c32">
    <af:forEach var="item" items="#{row.bundleProduct.commercialProduct.uiCategory}" >
    <af:outputText value="#{item.categoryName}" id="ot119"/>
    </af:forEach>
    </af:column>
    -->
    <af:column sortable="false" headerText="AssetCount" id="c22">
    <af:outputText value="#{row.assetCount}" id="ot1"/>
    </af:column>
    <af:column sortable="false" headerText="blockingReason" id="c3">
    <af:outputText value="#{row.blockingReason}" id="ot2"/>
    </af:column>
    <af:column sortable="false" headerText="blockingProduct" id="c4">
    <af:outputText value="#{row.blockingProduct}" id="ot3"/>
    </af:column>
    <!--<af:column sortable="false" headerText="availaibleActions" id="c1">
    <af:commandButton text="#{row.availaibleActions}" id="cb1"
    actionListener="#{pageFlowScope.sampleManagedBean.callAction}"
    partialSubmit="true">
    <af:setPropertyListener from="#{row.availaibleActions}"
    to="#{pageFlowScope.avalibleaction}" type="action"/>
    </af:commandButton>
    </af:column>-->
    </af:table>
    Can anyone pls give some solution ...

    Hi Frank,
    value="#{pageFlowScope.sample1}"
    here sample is
    Map<String, Object> flowScope1 =
    ADFContext.getCurrent().getPageFlowScope();
    flowScope.put("sample1", listOfEnrichProducts);
    this is not the problem . i am able to get all the values except the following .
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);

Maybe you are looking for

  • Blackberry 10.2 no default applications!

    Hello! I have BB z10 stl100-1. I downloaded autoloader from official site https://developer.blackberry.com/devzone/blackberry10devalpha/devalpha_update.html and updated my OS. Now I haven't a lot of applications: music, video, picture, calc, docs, fi

  • Seeburger AS2 adapter issue

    Hi experts We have migrated from XI 3.0 to PI 7.1. The corresponding AS2 seeburger is also upgraded to a compatible version. But after that it seems the mapping is not working. I am getting the foollowing error while using AS2 adapter at receiver sid

  • Acrobat 9 Pro to reinstall on a new computer

    Where can I diwnload Adobe Pro to reinstall on a new computer?

  • I can't open a new tab

    I've tried clicking the the plus button, pressing ctrl + t, and right clicking the tab bar and p ressing new tab. BUT NOTHING WORKS. To get tabs I have to right click links and click open in a new tab. But that's really annoying. What do I do?

  • Ipod and the bridge 2

    Traduction (français > anglais) hello my ipod told me that he does not recognize my 2 Periferique the bridge yet before he fonctionnaie although I wonder if ais n is not a software cause the ipod to another one with this problem!