Programatically Querying Values from Garbage Collector Manager MBean

Querying attribute values from some MBean are very easy such as : Available
Object mbeanObjectName = new ObjectName("java.lang:type=OperatingSystem");
Object attribute = _mbsc.getAttribute(mbeanObjectName, "AvailableProcessors");My question is... Is there an easy way to query values such as
LastGcInfo in java.lang:type=GarbageCollector,name=MarkSweepCompact
Inside this attribute, the value for memoryUsageAfterGc is a type of Map (TablularData). The tablular data contains a key and value pair. I am after Perm Gen. The value is a CompositeData type.
After drilling all the way in, I arive at the value I am after "used".
Is there an easy way to query this value directly? Maybe through getAttribute?
Or, is the only way to write a lot of code and iterating through the maps and composite data?

By far the easiest way of dealing with MXBeans programmatically is through MXBean proxies. You can do this:
import com.sun.management.GarbageCollectorMXBean;
import com.sun.management.GcInfo;
...other imports from java.*...
GarbageCollectorMXBean gcm =
     ManagementFactory.newPlatformMXBeanProxy(
        _mbsc, "java.lang:type=GarbageCollector,name=MarkSweepCompact",
        GarbageCollectorMXBean.class);
GcInfo gci = gcm.getLastGcInfo();
Map<String, MemoryUsage> map = gci.getMemoryUsageAfterGc();
MemoryUsage mu = map.get("PS Perm Gen");
long used = mu.getUsed();It's still a fair amount of code, but you don't need to iterate over anything or look at CompositeData ever.
The com.sun.management interfaces used here are documented at http://java.sun.com/javase/6/docs/jre/api/management/extension/overview-summary.html
Regards,
�amonn McManus -- JMX Spec Lead -- http://weblogs.java.net/blog/emcmanus

Similar Messages

  • How to get the query values from the url in a servlet and pass them to jsp

    ok..this is the situation...
    all applications are routed through a login page...
    so if we have a url like www.abc.com/appA/login?param1=A&param2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
    so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanks

    ok..this is the situation...Sounds like you have a bad design on your hands.
    You're going to send passwords in a GET request as clear text? Nice security there.
    Why not start with basic security and work your way up?
    %

  • Querying value from a range of two values

    I have patched together a shopping cart, operating on CF8,  and am now trying to add shipping.  The client wants the shipping charges based on the cost of item, ie:
    0-$499 is $20
    $500 – $999 is $25.00
    $999 – up $45
    I built an access table (simplified) with the following rows
    Price_min, Price_max,ship_cost
    The idea is to query the subtotal from the price_min and Price_max to determine the shipping cost:
    <cfquery name="getInfo" datasource="#application.databasePRD#">
    select ship_cost, price_min,price_max
    from shipping
    where price_min >= #form.subtotal# and price_max <= #form.subtotal#>
    </cfquery>
    </cfif>
    <cfoutput query="getInfo">
    #ship_cost#
    </cfoutput>
    Alas, I get the following error:
    Syntax error (missing operator) in query expression ‘price_min  >= 29 and  price_max <= 29'.
    What am I doing wrong?

    Rickaclark54,
    I expected your query to work. However, from your explanation, I expected the operators to be the other way round! That is, this query:
    <cfquery name="getInfo" datasource="#application.databasePRD#">
    select ship_cost, price_min, price_max
    from shipping
    where shipping.price_min <= #form.subtotal#
    and    shipping.price_max >= #form.subtotal#
    </cfquery>
    If you continue to have problems, then verify that the database columns ship_cost, price_min and price_max have numeric datatypes. In any case, an even better query statement is:
    <cfquery name="getInfo" datasource="#application.databasePRD#">
    select ship_cost, price_min, price_max
    from shipping
    where shipping.price_min <= <cfqueryparam cfsqltype="cf_sql_numeric" value="#form.subtotal#">
    and    shipping.price_max >= <cfqueryparam cfsqltype="cf_sql_numeric" value="#form.subtotal#">
    </cfquery>

  • Programatically passing value from one UIComponent to Another

    Hi, I'm using JDeveloper 11.1.1.6.
    I have an input-date field which is tied to a bean, and a input-text field that was generated from the DataControl i.e. tied to the iterator.
    Requirement: When user enters a date by date-picker, in the "ChangeValueListener", copy over the String conversion of that date to the input-text field.
    String value must be saved to the database. And the value must reflect the date picked via date-picker in input date component.
    Results: In each case that I have tried, the String gets set, and I can see it change/set in the UI, and also via debug BUT on SAVE, the string value is not saved to the database.
    Problem: The String input-text is being saved on screen, but on Submit it is not being saved to the Database.
    When I modify the String input-text by typing (not programatically), and click Save, it will save to the DB. But when I do programatically it does not save to the DB, only on screen.
    Scanrios tried:_
    *(1)* DC Binding:
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("Organization_OperationsIterator");
    String attribute = (String)iterBind.getCurrentRow().getAttribute("oop_certified_date"); // for retrieval
    iterBind.getCurrentRow().setAttribute("oop_certified_date", df.format(inputDate)); // for set value
    *(2)* ADF Binding, where the String input-Text field bound as certDateText RichInputText Field in the Bean
    this.getCertDateText().setValue(df.format((Date)valueChangeEvent.getNewValue())); // for set
    String certDate2 = (String) this.certDateText.getValue(); // for get
    *(3)* Attribute Binding
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    AttributeBinding dateBinding = (AttributeBinding)bindings.getControlBinding("oop_certified_date");
    dateBinding.setInputValue(attribute2); // set new value
    *(4)* Direct setting/getting to the bind Attribute
    String expression1 = (String) resolveExpression("#{bindings.oop_certified_date.inputValue}");
    setExpressionValue("#{bindings.oop_certified_date.inputValue}", attribute2);
    String expression2 = (String) resolveExpression("#{bindings.oop_certified_date.inputValue}");
    Also tried some additives such as:_
    (a) ValueChangeEvent vce = new ValueChangeEvent(this.getCertDateText(), attribute, attribute2);
    (b) valueChangeEvent.getComponent().processUpdates(facesContext);
    (c) AdfFacesContext.getCurrentInstance().addPartialTarget(this.getCertDateText());
    BUT TO NO AVAIL.
    In all the cases I tried above (1,2,3,4), the String input-text value gets set in the UI, and also when I do retrieval/gets I see that it is set.
    Yet when I click submit, the old value persists, not the new one that was programatically set!
    And remember, if I type directly in the String input-text (not setting programatically), then the new TYPED value is submitted!
    Please Help! I have fought with this for 2 days and run out of options.

    The below worked. I still has not yet hashed out which lines are redundant (I'm sure at least some are), but the combination below works.
    this.getCertDateText().setSubmittedValue(null);
    this.getCertDateText().resetValue();
    this.getCertDateText().setSubmittedValue(df.format((Date)valueChangeEvent.getNewValue()));
    this.getCertDateText().setValue(df.format((Date)valueChangeEvent.getNewValue()));
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getCertDateText());
    ValueChangeEvent vce = new ValueChangeEvent(this.getCertDateText(), attribute, attribute2);
    vce.queue();
    FacesContext fc = FacesContext.getCurrentInstance();
    valueChangeEvent.getComponent().processUpdates(fc);
    I also have to figure out why. But at least the problem is now solved.

  • Recupérer les valeur d'un Control via un .obj appelé depuis une DLL- Getting a Control value from an .obj file called from a dll

    Bonjour,
    Suite au passage à la version CVI 2013, il faut passer par un fichier .obj au lieu du .c quand on veut utiiser la LoadExternalModule.
    Le pb qui en résulte impossibilité de récupérer la valeur des control dans l'uir géré par le .obj qui est appelé par une dll.
    Autrement, il m'est impossible de faire parvenir à la dll les valeur des control ( dll qui appelle le .obj).
    Quelqu'un a eu le même soucis amigos?
    Merci
    Hi,
    When using the LoadExternalModule function in CVI 2013, we can no longer use a .c file. Instead we have to use an .obj file.
    My issue is that' impossible for me to get a control value from an .iur managed by the .obj witchi is called by a dll. 
    Otherwise it's impossible for me to get the control vale when calling the .obj from a dll.
    Any suggestions Amigos
    Thanks

    For people who could be interested in, here the code I provided to the customer. This code demonstrates that calling a function defined in a .obj file from a DLL which is called itself by a program can be realized without throwing any error.
    In order to use this example, you will have to :
    1) Open "main.cws"
    2) Define "Madll" as Active Project (right clic on the project and click on "Set Active Project")
    3) Build the DLL (CTRL+M)
    4) Define "Main" as Active Project
    5) Click on "Debug Project" in order to build the executable and run it
    This example has been built with CVI 2013.
    Jérémy C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France
    Attachments:
    main.zip ‏70 KB

  • How to pass query string from content editor webpart to another?

    Hi All,
    I am using content editor web-part to show GooglePiechart  for workflow status column in a list. When user click on chart, i need to show particular clicked area data in another list web-part. So that, i need to pass the query value from content editor
    web-part to another web-part. How to achieve this scenario?

    Hi Sam,
    What you can do is using SPD create a data view webpart which excepts query string value as filters as shown in the below article
    http://madanbhintade.wordpress.com/2012/01/08/sharepoint2010dataviewwebpart/
    http://sharepoint.stackexchange.com/questions/55184/how-to-filter-dataview-webpart-dvwp-from-query-string
    Then When you click on the pie charts particualr section perform a post back  by appending the required query string paramter to the same page on which your webpart exist
    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

  • How to  get formated value from query

    i get value from query use the follow method
    Object obj1 = dataAccess.getValue(i,j,DataMap.DATA_UNFORMATTED);
    Object obj1 = dataAccess.getValue(i,j,DataMap.DATA_FORMATTED);
    the first method retrun a value '1666.0',
    the second method return a value null
    but i want to get the value '1,666'.
    who can tell me how can get the formated value?

    Ahu,
    An implementation of DataAccess is not required to support all DataMap constants. For example, the OLAP-based Query object does not support DataMap.DATA_FORMATTED. To find out which DataMaps are supported for a particular implementation, you can call the DataDirector's getSupportedDataMap method.
    If you have an Crosstab instance, there is a way to get the formatted cell value, based upon the formatting rules associated with the Crosstab. Get the GridViewFormatManager reference from the Crosstab, and call its formatDataValue method to return a String representation of the formatted data value.
    Hope this helps,
    djb

  • MDM Import Manager - remove multiple values from a multi valued fiedl

    Hi,
    We have this multi-valued field and we would like to clean the values from it.
    How can we do this using MDM Import Manager?
    Example:
    Article A
    Field XPTO has values Z, T and P.
    We want this field XPTO with no values. How can we do a mass actualization to clean the field for some articles?
    Thanks and regards,
    Maria

    *We have this multi-valued field and we would like to clean the values from it.
    How can we do this using MDM Import Manager?
    Example:
    Article A
    Field XPTO has values Z, T and P.
    We want this field XPTO with no values. How can we do a mass actualization to clean the field for some articles?*
    Hi Maria,
    There can be multiple ways to achieve this -
    1.After doing field mapping for XPTO you can set conversion filter for each of the values.
    2.Value map with NULL.
    3.Trigger a Workflow on import/record add,run assignment and make that field NULL.
    4.Run mass update for conditional assignment based on that value of XPTO.
    There can be more ways,whichever suits you best you can go ahead with that.
    Hope it helped
    Regards,
    Ravi

  • How to get iterator values from a managed bean ?

    Due to a bug in selectOneChoice i'm not able to get the label list i want to display directly from an iterator when the value binding is a managed bean.
    To solve the problem i would like to create a managed bean that contains that list and use it as the selectItems to display.
    I would like that the values in that managed bean loaded from the a data control iterator.
    My question is :
    1) is it possible to access the iterator values from a managed bean, i mean without any reference to a page definition
    2) how to do ? is it documented somewhere ? any example ?
    Thank you

    I got it also with this code:
    package view.managedBeans;
    import classification.bean.ClassificationDocument;
    import classification.castor.ClassificationLanguage;
    import java.io.FileNotFoundException;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.List;
    import java.util.Locale;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.generic.DCGenericDataControl;
    import org.exolab.castor.xml.MarshalException;
    import org.exolab.castor.xml.ValidationException;
    public class ClassificationLanguageList {
    private java.util.List<SelectItem> supportedLanguages = new ArrayList();
    public ClassificationLanguageList() throws FileNotFoundException,
    MarshalException,
    ValidationException {
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding vb = ctx.getApplication().createValueBinding("#{data.ClassificationDocumentDataControl}");
    DCGenericDataControl classificationDocumentDataControl = (DCGenericDataControl)vb.getValue(ctx);
    ClassificationDocument classificationDocument = (ClassificationDocument)classificationDocumentDataControl.getDataProvider();
    ClassificationLanguage[] classificationLanguage = classificationDocument.getClassification().getClassificationLanguageList().getClassificationLanguage();
    for (int counter = 1; counter < classificationLanguage.length; counter++) {
    SelectItem language = new SelectItem();
    language.setValue(classificationLanguage[counter].getClassificationLanguageCode());
    language.setLabel(classificationLanguage[counter].getClassificationLanguageLabel());
    supportedLanguages.add(language);
    public void setSupportedLanguages(java.util.List<SelectItem> supportedLanguages) {
    this.supportedLanguages = supportedLanguages;
    public java.util.List<SelectItem> getSupportedLanguages() {
    return supportedLanguages;
    }

  • Remove null values from query

    Hi All;
    Below is my query and the output and i need to remove null values from the output
    Any help regarding same is much appreciated
    Thanks
    ; WITH CTE AS
    select a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,c.fullname,a.new_mainprogramme_idname,
    a.new_subprogramme_idname,
    a.owneridname,
    a.new_dateofapplication,count(appt.activityid) as NoOfAppointments,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    from opportunity a
    left join contact c on (c.contactid = a.parentcontactid)
    inner join activitypointer ap on ( ap.regardingobjectid = c.contactid )
    inner join appointment appt on (appt.activityid = ap.ActivityId)
    where
    appt.new_didmeetingtakeplace = 1
    and appt.statecode = 1 and
    (a.SCRIBE_DELETEDON is null and c.SCRIBE_DELETEDON is null and ap.SCRIBE_DELETEDON is null and appt.SCRIBE_DELETEDON is null)
    group by a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid, c.contactid,c.fullname,a.owneridname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,
    a.new_dateofapplication,ap.scheduledstart,
    ap.scheduleddurationminutes
    union
    select a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,c.fullname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,a.owneridname,
    a.new_dateofapplication,count(appt.activityid) as NoOfAppointments,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    from opportunity a
    left join contact c on (c.contactid = a.parentcontactid)
    inner join activitypointer ap on (ap.regardingobjectid = a.opportunityid)
    inner join appointment appt on (appt.activityid = ap.ActivityId)
    where
    appt.new_didmeetingtakeplace = 1
    and appt.statecode = 1 and
    (a.SCRIBE_DELETEDON is null and c.SCRIBE_DELETEDON is null and ap.SCRIBE_DELETEDON is null and appt.SCRIBE_DELETEDON is null)
    group by a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,a.owneridname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,
    c.fullname,a.new_dateofapplication,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    CTE2 As
    select opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte.owneridname,
    ac.new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    case when ac.new_businessstartdate > = CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end as PreStartHours,
    case when ac.new_businessstartdate < CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end as PostStartHours
    pp.new_outputs,
    case when po.new_outputsname = 'Pre Start Assist'
    then 'Yes' else 'No' end as Precheck,
    case when po.new_outputsname = 'Business Assist'
    then 'Yes' else 'No' end as Buscheck
    from CTE
    join account ac on (ac.accountid = CTE.parentcustomerid)
    join dbo.new_programmeoutput as po on (CTE.opportunityid = po.new_relatedopportunity)
    join dbo.new_programmeprofile pp on (
    po.new_mainprogrammeid = pp.new_mainprogrammeid and
    po.new_subprogrammeid = pp.new_subprogrammeid
    and pp.new_claimstartdate = po.new_claimdate
    and pp.new_outputsname = po.new_outputsname)
    where (ac.SCRIBE_DELETEDON is null)
    group by opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,ac.new_businessstartdate,new_dateofapplication,NoOfAppointments,
    scheduledstart,new_mainprogramme_idname,new_subprogramme_idname,cte.owneridname,scheduleddurationminutes
    select opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte2.owneridname,
    new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    PreStartHours, PostStartHours,po.new_programmeoutputid,
    case when (new_outputsname) = 'Pre Start Assist'
    then 'Yes' else 'No' end as Precheck,
    case when (new_outputsname) = 'Business Assist'
    then 'Yes' else 'No' end as Buscheck --po.*
    from cte2
    left join dbo.new_programmeoutput as po on (cte2.opportunityid = po.new_relatedopportunity)
    where po.new_claimmonthidname is not null and po.statuscode_displayname = 'claimed'
    group by opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte2.owneridname,
    new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    PreStartHours, PostStartHours,po.new_programmeoutputid,new_outputsname
    --where new_claimmonthidname is not null --and CTE2.PreStartHours is not null and CTE2.PostStartHours is not null
    Pradnya07

     i need to remove null values from the output
    Hello,
    What exactly do you mean with "remove", to filter the rows out from result set or to replace the null value by an other value e.g. 0? This can be done with the
    ISNULL function:
    ISNULL(case when ac.new_businessstartdate > = CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end, 0) as PreStartHours, ...
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Custom Manage Property does not pick up the value from mapping crawl property

    Hi All,
    I have created a custom list with the column name that's called "category".
    Then I ran full crawl and I saw the "ows_category" crawl property is created.
    Then I create the manage property names as "Category" and map with the "ows_category" and run the full crawl again. (Retrivable, Searchable, Refinable options are checked)
    After full crawl, I searched Category:keyword but it returned 0 result. 
    But when I search keyword, that list item is retuned
    I tried to debug with the spsearch2013 tool and there is no "Category" manage property in the return XML.
    It seems the Manage Property does not pick up value from the crawl property. (Something might be wrong with the index schema)
    Do you have any suggestion?
    Do I need to reset the index?
    Best Regards,
    Andy

    Hi Andy,
    When you search ‘category’ in crawled properties(Central Administration->Search Service Application->Search Schema), you will see ows_Category is mapped to DiscussionCategory, like the screenshot:
    So, I suggest you create a new column using another name, then test again, compare the result.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Using a characteristic value from an infoCube as a variable in a query

    Hi gurus!
    I have a query based on an infoCube where I make a restricted key figure. I restrict the key figure by selecting a specific month using 0calmonth.
    I need to create a variable that represents a specific month which will change every year. I have this month value stored in another infoCube. In this infoCube I have 0employee and for each employee the characteristic 0calmonth represents the month I need to use in my other query.
    So my question is: how can I retrieve the the value from 0calmonth (fx. 012009) from one infoCube and use it as an input in my other query for restricting the key figure using 0calmonth?
    Thank you!
    Best regards,
    Morten

    Hi guys,
    Thanks for your help so far. I would like to use the replacement path using another query. It seems more simple since I don't need to do any ABAP programming.
    However, it doesn't work for me. I made a pre-query on the infoCube, which contains the month I need for my other query. This pre-query uses a variable which restricts the data output to only data for current year up to current month. So if my input is 072009, then I will receive data for 012009-072009. My query result will then show me the month I need, since there will only be data for one specific month. So for 2009, the month that contains any data will be 052009. I need this month(052009) in my other query.
    So, in my original query I made a new variable for 0calmonth and I chose replacement path and the pre-query. I made a restricted key figure where I use the replacement path query. However, I am gettings errors, when I check the report and no data is available when I execute the query. The error says:
    Variable "prequery_variable" cannot be used in selection "key figure 1"; remove
    How you seen this error before?
    Thank you!

  • Need of SQL query in selecting distinct values from two tables

    hi,
    I need a query for selecting distinct values from two tables with one condition.
    for eg:
    there are two tables a & b.
    in table a there are values like age,sex,name,empno and in table b valuses are such as age,salary,DOJ,empno.
    here what i need is with the help of empno as unique field,i need to select distinct values from two tables (ie) except age.
    can anybody please help me.
    Thanks in advance,
    Ratheesh

    Not sure what you mean either, but perhaps this will start a dialog:
    SELECT DISTINCT a.empno,
                    a.name,
                    a.sex,
                    b.salary,
                    b.doj
    FROM    a,
            b
    WHERE   a.empno = b.empno;Greg

  • Query multiple occurances of min value from table using group by

    Hello all,
    I am using Oracle 10.2 on Windows 2003
    I am attempting to select the min value from a table, and if there are multiple occurances of a min value, to list all not just one row. For example, the following query
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '3' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '4' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '5' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '6' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    select trunc(t_date,'YYYY') t_date, min(t_value) min_value
    from test1
    group by trunc(t_date,'YYYY') gives the following results
    t_date         min_value
    01-JAN-09    1
    01-JAN-10    1so I looked at the forums and tried the following query
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '3' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '4' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '5' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '6' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    select t_date,min_value
    from (select t_date,min(t_value) min_value,
    rank() over (order by min(t_value) ASC) RN
    from test1 group by t_date)
    where rn=1I get the desired results with this query, which are
    t_date           min_value
    01-NOV-09     1
    01-JAN-10      1
    01-JUN-10      1
    01-JUL-10       1the problem is, when I change the values in the test1 table to the following
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '123' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '21' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '13' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '24' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '15' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '26' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '100' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    select t_date,min_value
    from (select t_date,min(t_value) min_value,
    rank() over (order by min(t_value) ASC) RN
    from test1 group by t_date)
    where rn=1i get the following results
    t_date          min_value
    01-JUN-10     100I expected to get the results
    t_date         min_value
    01-DEC-09     2
    01-JUL-10      2any help would be appreciated
    Cheers

    Because t_value is character.
    You should To_NUMBER(t_value)
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '123' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '21' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '13' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '24' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '15' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '26' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '100' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    select t_date,min_value
    from (select t_date,min(t_value) min_value,
    rank() over (order by min(To_NUMBER(t_value)) ASC) RN
    from test1 group by t_date)
    where rn=1

  • How to retrieve query string value from the URL in my portlet

    Hi,
    When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
    My URL will look like this.
    http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
    Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
    Please help me regarding this.
    Thanks in advance.
    Thanks,
    sreekanth.

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

Maybe you are looking for

  • Mac requests to restart

    i am using a mac book pro running osx lion 10.7.5 i was playing duke nukem manhattan project .iam using wine skin. i wanted to stop so i forced it to quit. after that i got this message i am sorry the image is upside down .(held the camera upside dow

  • Calling application from other database

    It's possible to call an application on another database, without informing user and password again?

  • Cover Art refresh from files

    I store all my music on an external disk. A few days ago I started iTunes without that disk attached. I have around 3000 albums/50,000 tracks - 98% of which have album art. With that restart though, all of the album art disappeared leaving me just th

  • SQL Server 2000 Driver. No connection to Database

    I'm using VisualAge 4.0 with JDK 1.2.2 This is the command: Connection con = DriverManager.getConnection ( "jdbc:microsoft:sqlserver://192.111.0.18:1020;DatabaseName=Test","sa",""); This error occures: Cannot open database requested in login'Test' Wh

  • Exporting resulting Applets as jpg,gif or png

    Hello, i am currently working on an applet, included in a webapplication. The insurance agent make a drawing of an accident within this applet and i need to export the result as a file. Does anyone know how ? is this even possible with applets ? hope