Revaluate function using a negative value in the revaluation variable

Hello,
I'm trying to use the revaluate function in IP, using a user defined variable containing a negative value, I have a error that tells me that the value in the variable is incorrect.
I've tried several syntaxes, including "-10" or "10-" to revaluate the ratios at 90% of their original values, but without otaining any success.
Has somebody an idea ?
Regards,
Mickael

Hi Michael,
we noticed the same and we created a simple FOX formula for this. This works fine then
(One should use values like 0,5 I guess to devaluate which is not user friendly)
D
For example:
DATA LV_REVALUATION TYPE F.
LV_REVALUATION = VARV(Z_REVALUATION).
= * (1 + ( LV_REVALUATION / 100)).
(Z_REVALUATION is a variable type formula.)

Similar Messages

  • Calling Stored function and showing returned value on the UI screen

    I am calling a stored function by using the following steps mentioned as per the below link. The stored function returns a single scalar value
    http://download.oracle.com/docs/cd/E1790401/web.1111/b31974/bcadvgen.htm#sm0297_
    Please verify if I am putting the code in the classes as required by the ADF framework.
    * 1) In class CustomApplicationModuleImpl extends ApplicationModuleImpl*
    // Some constants
    public static int NUMBER = Types.NUMERIC;
    public static int DATE = Types.DATE;
    public static int VARCHAR2 = Types.VARCHAR;
    protected Object callStoredFunction(int sqlReturnType, String stmt,
    Object[] bindVars) {
    CallableStatement st = null;
    try {
    // 1. Create a JDBC CallabledStatement
    st = getDBTransaction().createCallableStatement(
    "begin ? := "+stmt+";end;",0);
    // 2. Register the first bind variable for the return value
    st.registerOutParameter(1, sqlReturnType);
    if (bindVars != null) {
    // 3. Loop over values for the bind variables passed in, if any
    for (int z = 0; z < bindVars.length; z++) {
    // 4. Set the value of user-supplied bind vars in the stmt
    st.setObject(z + 2, bindVars[z]);
    // 5. Set the value of user-supplied bind vars in the stmt
    st.executeUpdate();
    // 6. Return the value of the first bind variable
    return st.getObject(1);
    catch (SQLException e) {
    throw new JboException(e);
    finally {
    if (st != null) {
    try {
    // 7. Close the statement
    st.close();
    catch (SQLException e) {}
    With a helper method like this in place, calling the func_with_no_args procedure shown in Example 37-7 would look like this:
    *2) In class CustomServiceImpl extends CustomApplicationModuleImpl*
    public String callEnvironmentName(){
    return (String) callStoredFunction(VARCHAR2, "CAR_UTIL_PK.get_environment_name()", new Object[] {});
    3) If I have the first two steps correct, I was to display the value returned by method callEnvironmentName() with scalar values like (Development, Production etc) at the footer of each JSFX page. What is the flow I should follow, should I call callEnvironmentName() from some managed bean? Also I want to store it once on first call to some application variable and use that to populate the JSFX pages. Is there a working example. What is the best practice?
    Thanks
    Edited by: user5108636 on Apr 5, 2011 11:58 PM

    Hi John,
    Duplicate alerts are coming for BP_Confirmed as well as one custom event. Earlier I thought there is some issue with my custom event, but when it came for BP_Confirmed also, then i have a doubt something is wrong with the application.
    I have also checked that BP_Confirmed is being raised only once inside the method-BP_CONFIRM of class-cl_crmcmp_b_cucobupa_impl.
    raise event BPConfirmed
      CLASS cl_crm_ic_services DEFINITION LOAD.
      CREATE OBJECT event.
      event->set_name( if_crm_ic_events_con=>gc_bpconfirmed ).
      event_srv = cl_crm_ic_services=>get_event_srv_instance( ).
      event_srv->raise( event ).
    Are you aware of any other place from where this event is getting triggered?
    Thanks for your help!
    Regards,
    Rohit

  • Function module for retrieving values of the Characteristics?

    Hi,
    is there a function module for retrieving values of the Characteristics?
    will reward,
    regards,
    M.

    Hello,
    Check this.
        L_OBJECT = G_T_STPO-IDNRK.
    *--- Merkmale incl. Bewertung zum Objekt/Klassenart lesen ----------*
        CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
             EXPORTING
                  CLASSTEXT          = 'X'
                  CLASSTYPE          = '300'
                  FEATURES           = 'X'
                  LANGUAGE           = SY-LANGU
                  OBJECT             = L_OBJECT
                  INITIAL_CHARACT    = ' ' "keine unbewertete M.
                  OBJECTTABLE        = 'MARA'
                  KEY_DATE           = SY-DATUM
    *            NO_VALUE_DESCRIPT  =
                  CHANGE_SERVICE_CLF = 'X'
                  INHERITED_CHAR     = 'X'
             TABLES
                  T_CLASS            =  H_CLASS
                  T_OBJECTDATA       =  H_CLOBJDAT
             EXCEPTIONS
                  NO_CLASSIFICATION  = 1
                  NO_CLASSTYPES      = 2
                  INVALID_CLASS_TYPE = 3
                  OTHERS             = 4.
    Regards,
    Vasanth

  • Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

    Hi,
    I'm running WebLogic 5.1 sp10 on a Solaris box and I get the
    following error:
    java.rmi.RemoteException: java.lang.InternalError: Can't connect to
    X11 window server using ':0.0' as the value of the DISPLAY variable.
         at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
         at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:59)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:120)
         at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
         at java.awt.Font.initializeFont(Font.java:264)
         at java.awt.Font.(Font.java:298)
         at com.hrw.xls.EmailXLSThread.getCellWidth(EmailXLSThread.java:162)
    caused by the following code fragment:
    Font f = new Font(fontName, fontStyle, fontHeight);
    FontMetrics fm = (new Panel()).getFontMetrics(f);
    Have I just forgotten to set an environment variable? I would prefer
    not to install bulky pieces of software, but if that's what it takes
    to get over this error, so be it.
    Thanks, Dave A.

    A Java AWT, X11 problem posted in the weblogic ejb newsgroup. I haven't been in here for long, but
    that has to be a first.
    If you have the DISPLAY env variable set to :0.0, you have to be at the console on a Solaris box
    running the XServer. 'xdm' I think is the code that has to be running. Also, I think the format is
    <hostname:0.0> or better <hostname:0> unless you are on a multi-headed workstation. Something like:
    export DISPLAY=hostname:0
    where hostname is the name of the host running an XServer and the .xhosts file allows access to the
    XServer from the display client.
    Apparently, you are not at the console?
    Anyway, I don't think there is a newsgroup here that I could even recommend to cross-post this to as
    it is not a WebLogic question. I think I would try the Discussion Forums at http://java.sun.com.
    Bill
    "D. Alvarado" wrote:
    Hi,
    I'm running WebLogic 5.1 sp10 on a Solaris box and I get the
    following error:
    java.rmi.RemoteException: java.lang.InternalError: Can't connect to
    X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:59)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
    at java.awt.Font.initializeFont(Font.java:264)
    at java.awt.Font.(Font.java:298)
    at com.hrw.xls.EmailXLSThread.getCellWidth(EmailXLSThread.java:162)
    caused by the following code fragment:
    Font f = new Font(fontName, fontStyle, fontHeight);
    FontMetrics fm = (new Panel()).getFontMetrics(f);
    Have I just forgotten to set an environment variable? I would prefer
    not to install bulky pieces of software, but if that's what it takes
    to get over this error, so be it.
    Thanks, Dave A.

  • The find function used to automatically scroll to the next word, now it doesn't. How do I fix it?

    The find function used to automatically scroll to the instance of the word I was looking for. Now it doesn't. How do I fix this?
    == This happened ==
    Every time Firefox opened
    == a few months ago

    Hmm... you're right. I don't have access to that Google Doc, but our support.mozilla.com weekly metrics are on Google Docs, and I see the same issue there.
    https://spreadsheets.google.com/ccc?key=0Aibg4PvTbjUKcGlBLWEtZFhDTDJwN3ZCNXBUdTBIS0E&hl=en#gid=0
    It may be specific to Google spreadsheets (and whether or not you have permission to edit the doc). I'm currently trying to find out if that's a Firefox bug, or a Google bug. If you use the '''Ctrl-F''' keyboard shortcut, Google's Find feature takes over, so they obviously want people using their Find utility.

  • Can we set a default value for the container variable in BPM?

    Can we set a default value for the container variable.?
    Suppose if i have a loop step and i have given a container variable i=5 as end condition.What value will it take during its first execution?Can we set the value for container before a recieve step?

    Hi
    Define Container Variable of Type integer and Category Simple Type .Use Condtion in Loop.
    In Container Operation Step Assign value and Use Expression to
    Increase or Decrease Valus according to your operation.
    look Pattern 4 in this blog to understand Container Operation
    /people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

  • Numeric Integration of positive and negative values in the same signal

    Hello.. I need to perform an evaluation of Area Under Curve of my signal, but it contains positive and negative values. I am using the "Numeric Integration" function, but the result expressed by my VI represent: AREA OF POSITIVE VALUES - AREA OF NEGATIVE VALUES, in other words, my result represent the difference between these two areas. But I want to know the total area, the sum of positive values area and negative values area, and because both values has are "+", my final result should has "+" notation.
    For example:
    Area of positive values: +45.00
    Area of negative values: +34.00
    Total area: +79.00
    How do I modify my VI to obtain the total area value?
    I try to split my values in two parts:
    A) only the positive and zero values
    B) only the negative values
    I calculated the areas of both splits and performed an sum of them, but the final result does not matches with total area (computed by another software to know the real value)
    I attached an picture of my VI
    Thank you
    Daniel
    Attachments:
    Numeric Integration1.png ‏12 KB

    Use an event structure for the boolean value changed. You also did not follow Lynn's advice to insert an "absolute value". It would really simplify everything.
    Here's how it would look in a newer version of LabVIEW (your icons look different because you have an older version. The functions are the similar).
    This is just a draft and the program needs to be improved. Use a state machine with events for read file and another for value change on the sampling rate. Place the data array in a shift so you can change the sampling rate without the need to re-read the file. Modify as needed. 
    Some important pointers in general:
    There is NO need to constantly spin the loop every nanosecond. The only time the loop needs to spin if if one of the inputs has changed.
    If you don't use an event structure, all UI loops need a wait to conserve CPU.
    Never (almost never) use "switch until released". Typically you want to use "latch when released" which makes the terminal true exactly once until the value is read and it will revert to false after that. "switch until released acts like a doorbell, so if it werent for the file dialog, you would execute the case several times in a row.
    You don't need to get the array size and wire N of the FOR loop if you are autoindexing. LabVIEW will spin the loop until it runs out of elements automatically.
    There is an atomic operation for "negate" in the numeric palette. No need to multiply with a "-1" diagram constant.
    There is an atomic operation for ">=0" in the comparison palette. No need to compare with a "0" diagram constant.
    Use a stop button on the loop termination.
    Everything that only needs to be done once after the file is read (e.g. you inner loop, etc. also belongs inside the case structure. Right?
    In general, you would make things much easier for us if you would attach your actual live VI instead of dead images.
    Message Edited by altenbach on 04-19-2008 12:22 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    areaPositive.png ‏9 KB

  • How to display only Negative values in the report.....

    Hi,
    I want to display only negative values for one particular column.
    Any suggestions ?
    Thanks,
    Jeetu

    Hi,
    define a condition for all characteristics and for specially the keyfigure. Set it to < 0. That should do the trick.
    regards
    Siggi

  • Adding a Variable Value to the cpQuizInfoPointsScored Variable

    I have a variable that I am using to track incorrect responses (clicking incorrect buttons while completing a process) and I want to add the value of the the variable to the value of cpQuizInfoScored. I can create an expression to add the two but I can't select cpQuizInfoePointsScored to receive the total.
    Any help would be appreciated.

    Jimmy.  This might be that you are misunderstanding how the Interactive Master widget works with partial scoring.  Basically you need to specify the score that will be allocated to a slave object using the Scoring section in the Master Widget properties interface.  That's the score that will be reported to the Quiz instead of the default score you've assigned to the interactive widget via the Properties > Report Score section in Captivate.
    Using the preference settings you select, the Master Widget is going to try and work out whether or not the Variable Slave is in a Success or Failure condition, and THEN it will report whatever score you've assigned for that circumstance.
    What you're trying to do is a little different.  You want to have ONE variable slave that can have a score anywhere between 60 to zero.  My suggestion is that you consider using setting up different user variables for each of the interactive objects on the slide that you are tracking and then add each of these variables into the Master widget as Variable Slaves, assigning each one a Success or Failure score in the Scoring screen. 
    For example, if you ahve a number of click boxes on a slide and you are tracking whether or not the user clicks the right ones, you need to set up a user variable with a default value of 0 for each click box and assign that variable a value of 1 if the click box gets clicked.
    The Master Widget will be able to determine for each of these slaves whether they are in a Success or Fail condition based on whether the variable is set to 0 or 1 and then add up the relevant scores allocated for each variable.  This aggregated score is what can be reported to the quiz score, over riding the default score assigned to the widget.

  • Is there a way to use a shortcut value in the page's header template ?

    Hello everybody,
    we would like to create a page template with centralized information in the database. I tried to use the shortcuts inside the page template, but it doesn't seems it's working, or I'm not using it correctly.
    The only way I was able to use it is by using javascript to instanciate some properties, But I don't like that idea because it means I must edit all the page using that script. I simply want to change the page template and the changes be applied to all the page who are using that template.
    Here is what I want to do :
    <img src="#WORKSPACE#image/logo.png" alt='"MY_SHORTCUT"' />
    IS there a way to have a dynamic substitution variables that I could use in my html object attributes ? (I'm using APEX 3.2)
    Thank you
    Leinad
    Edited by: leinadjan on Oct 2, 2012 8:58 AM

    leinadjan wrote:
    Hello everybody,
    we would like to create a page template with centralized information in the database. I tried to use the shortcuts inside the page template, but it doesn't seems it's working, or I'm not using it correctly.
    Shortcuts are not available for use in page templates. This is something of a pain.
    The only way I was able to use it is by using javascript to instanciate some properties, But I don't like that idea because it means I must edit all the page using that script. I simply want to change the page template and the changes be applied to all the page who are using that template.
    Here is what I want to do :
    <img src="#WORKSPACE#image/logo.png" alt='"MY_SHORTCUT"' />
    IS there a way to have a dynamic substitution variables that I could use in my html object attributes ? (I'm using APEX 3.2)The closest equivalent to shortcuts in this case is probably an application item. Set the value using an application computation or process and reference it in the page template using static substitution syntax:
    <a href="http://myserver.com/htmldb/f?p=100:1:415680519803489:::::" title="&APP_ITEM."> <img src="#WORKSPACE#image/logo.png" alt="&APP_ITEM." /> </a>Not sure that it's necessarily a good idea to use the same value for link <tt>title</tt> and image <tt>alt</tt> text in this case though. What value(s) will be used?

  • NO ONE KNOWs??? EJB3.0: how to use column default value in the database??

    hi,
    This seems to be easy but I didn't find good answers... pls help...
    I have a table XYZ with a column:
    FriendlyName VARCHAR(30) NOT NULL DEFAULT 'my home'
    When I want to persist an entity object XYZ, I don't want to specify its field FriendlyName---in my program, l leave the field value to be null and I want to rely on the database to default its value to 'my home'
    however, i can't seem to do that because every time, i got the error msg saying the field "FriendlyName" can NOT be null.
    Is there a way for me to rely on the database to give the field its default value without specifying it in my entity class? (I am using ejb3.0 persistence+hibernate+mysql)
    thanks for ur input....

    That looks nice, when you don't include columns in
    inserts statements the dbms takes the default
    The question is: does hibernate understand and works
    with that?
    Let us knowWell, probably not. I did try that, somehow I got the following error msg. I did go through the log carefully, nothing really meaningful is there:
    javax.ejb.EJBException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3708)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3481)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1271)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
         at $Proxy66.saveControlPoint(Unknown Source)
         at com.mycompany.struts.action.CustomerActivateControlPointAction.execute(CustomerActivateControlPointAction.java:102)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:413)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1029)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1029)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
         at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:220)
         at com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:74)
         at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:162)
         at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:140)
         at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:79)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)

  • Why does this loop used to write values to the parallel port keep going forever?

    Have a look at this VI guys. I'm trying to send a sequence of bits (used to trigger an IC). I'm interested in the last bit of the data port (D0). so I'm sending either 0 or 1 to that pin to trigger the IC. it works, but the problem is that the loop keeps going forever and i cant control it. if i send 3 to the loop count, I'm expecting to get: 1 0 1 0 1 0, but it doesnt stop and keeps going forever.
    It seems that the problem is not with the loop. because i deleted the loop and just left the flat sequence so that it executes only once, but still it keeps repeating. How can i make the flat sequence execute only once?
    I'm using a parallel port monitor (parmon.exe) and a LED connected to D0 of the parallel port to check.
    If anybody has an alternative or better method to send the bits to the parallel port, I'd be very thankful.Message Edited by krayzie on 05-14-2005 04:33 PM
    Attachments:
    pport.vi ‏24 KB

    It works just fine here. Place an indicator to the iteration terminal [i] to watch how things progress. Do the number ever increase above N-1 to what you wire to N? I don't think so!
    Also make sure you don't run the VI with the "Continuous run" button. In this case the VI would immediately restart whenever it is finished. use the "Run" button.
    LabVIEW Champion . Do more with less code and in less time .

  • MONTHS_BETWEEN function returns 'wrong' negative values ???

    Hi,
    I can't figure out why these values are results.
    SQL> select months_between(to_date('02-FEB-13','DD-MON-RR'), to_date('28-FEB-13','DD-MON-RR')) from dual;
    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('28-FEB-13','DD-MON-RR')
                                                                         -.83870968
    SQL> select months_between(to_date('02-FEB-13','DD-MON-RR'), to_date('01-APR-13','DD-MON-RR')) from dual;
    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('01-APR-13','DD-MON-RR')
                                                                         -1.9677419
    SQL> select months_between(to_date('02-FEB-13','DD-MON-RR'), to_date('02-APR-13','DD-MON-RR')) from dual;
    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('02-APR-13','DD-MON-RR')
                                                                                 -2

    Hi,
    it could be worth also to mention a specific behavior of MONTHS_BETWEEN.
    In case the 2 dates are on the same day on different month, the time portion is not considered and result is always an integer.
    When the 2 dates are on different days then also the time portion in considered and the result is changing.
    Here is an example:
    alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS';
    select to_date('01-MAY-2013','dd-MON-yyyy') start_dt
         , to_date('31-MAY-2013','dd-MON-yyyy')+(level-1)*6/24 end_dt
         , months_between(to_date('01-MAY-2013','dd-MON-yyyy'), to_date('31-MAY-2013','dd-MON-yyyy')+(level-1)*6/24) diff
      from dual
    connect by level <= 10
    START_DT               END_DT                       DIFF
    01-MAY-2013 00:00:00   31-MAY-2013 00:00:00   -0.9677419
    01-MAY-2013 00:00:00   31-MAY-2013 06:00:00   -0.9758065
    01-MAY-2013 00:00:00   31-MAY-2013 12:00:00   -0.9838710
    01-MAY-2013 00:00:00   31-MAY-2013 18:00:00   -0.9919355
    01-MAY-2013 00:00:00   01-JUN-2013 00:00:00           -1
    01-MAY-2013 00:00:00   01-JUN-2013 06:00:00           -1
    01-MAY-2013 00:00:00   01-JUN-2013 12:00:00           -1
    01-MAY-2013 00:00:00   01-JUN-2013 18:00:00           -1
    01-MAY-2013 00:00:00   02-JUN-2013 00:00:00   -1.0322581
    01-MAY-2013 00:00:00   02-JUN-2013 06:00:00   -1.0403226
    Regards.
    Alberto

  • MONTHS_BETWEEN function returning wrong negative values

    Hello all,
    The following is the query I am puzzling over:
    select to_char(sysdate,'dd-MON-yyyy') AS TODAY, TO_CHAR(HYPOTHETICAL_DATE, 'dd-MON-yyyy') AS HYPOTHETICAL_DATE,
    months_between(sysdate,HYPOTHETICAL_DATE) AS DIFF_IN_MONTHS from TableX
    My result is:
    TODAY HYPOTHETICAL_DATE DIFF_IN_MONTHS
    21-MAR-2012     10-JUL-2020     -99,63109505675029868578255675029868578256
    I am puzzled since in this case since the 2nd date is 8 years down the line my difference should be -8 and a fraction. So why am I getting -99?
    Furthermore I would like to ignore the fractional part so the result I want for the above data is -8.
    Please help.
    Thanks
    S. BASU

    The name of the function is MONTHS_BETWEEN and not YEARS_BETWEEN. So the result is correct!
    Perhaps you are looking for something like:
    select trunc(months_between(sysdate,to_date('10.07.2020'))/12) from dual;or
    select round(months_between(sysdate,to_date('10.07.2020'))/12) from dual;TRUNC cuts the fraction and ROUND rounds it. For example it would be a difference for -8.7.
    Edited by: hm on 21.03.2012 02:42

  • What does the value of the BUFFERING variable indicate of MediaPlayer?

    Hi,
    I am trying to play a video(wmv) on a Windows Vista pc. The MediaView loads correctly: I see the black box the View appear, and I have print statements to let me know when player.play() is called. They print out with no Exceptions. I also print out the MediaPlayer.BUFFERING var. It prints as 3.0. What does this mean?
    My problem is that the video is not playing.
    Jman

    Hi
    MediaPlayer.BUFFERING is a status variable tha you can use to check the status of your player. As you can see on the [API page of MediaPlayer|http://java.sun.com/javafx/1.2/docs/api/javafx.scene.media/javafx.scene.media.MediaPlayer.html] there are also MediaPlayer.PAUSED, MediaPlayer.PLAYING and so on.
    The usage looks like this:
    if (myplayerinstance.status == MediaPlayer.BUFFERING){
    //do something
    }If you want to check how much of the media stream has already been buffered you may use "myplayerinstance.bufferProgressTime".
    Hope that answered your question on the BUFFERING value.
    To find out why the video isn't playing you could use the callBack functions and print out status and bufferProgressTime each time a callback (myinstance.onXY() ) is beeing called.

Maybe you are looking for