Urgent!! i need help on invoking the JVM from C++

Hi.. I have tried invoking the JVM and calling a java class through c++ but all i get is "can' find class java.lang.NoClassDefFoundError (Wrong class path?)
anyone has any ideas as to what i need to do.. i have set the path and classpath variables to my <jre>\bin\classic and <jre>\bin
here is the code..
//MyCApp2.cpp//
#include <windows.h>
#include <stdio.h>
#include <jni.h>
#define MAIN_CLASS "myApp1"
int main(int argc, char** argv)
JNIEnv               *env;
JavaVM               *jvm;
JDK1_1InitArgs     vmargs;
jint               rc;
jclass               cls;
jmethodID          mainId;
// get classpath env setting
char* szClasspath = getenv("CLASSPATH");
vmargs.version = 0x00010001; // version 1.1
int temp = JNI_GetDefaultJavaVMInitArgs(&vmargs);
// the classpath returned by JNI_GetDefaultJavaVMInitArgs is wrong
vmargs.classpath = szClasspath;
printf("\nclasspath ,%s\n\n",vmargs.classpath);
rc = JNI_CreateJavaVM(&jvm, (void**)&env, &vmargs); // create the jvm
if(rc <0 )
     printf("Can't create Java VM ,%d\n",rc);
     return 1;
printf("Passed the CreateVM Stage");
// load the class containing the static main ()method
cls = env->FindClass(MAIN_CLASS);
if ( cls == 0 )
     printf("Could not find class %s\n",MAIN_CLASS);
     return 1;
// find main method
mainId = env->GetStaticMethodID(cls,"main","([Ljava/lang/String;)V");
if (mainId ==0 )
     printf("Could not find main()\n");
          return 1;
env->CallStaticVoidMethod(cls,mainId, 0); // call main()
jvm->DestroyJavaVM(); // kill jvm
return 0;

You say you set your classpath to jre\bin and jre\bin\classic; did you include the path to MyApp.class?
Perhaps you forgot "."?

Similar Messages

  • Need help for focusing the cursor from one textbox to another textbox

    hii all,
    I have a problem in java script.
    Note:The textboxes are generated dynamically.it is not having fixed length.(the number of textboxes generated may be 3,2,4....etc.it is not fixed.
    To move cursor from one textbox to another text box ,I have taken the length of the textboxes of the first column.I used onkeyDown event .
    in the function ,first i checked the condition like
    for(i=0;i<form1.box.length;i++) //box is the name of the textboxes
    if(event.keyCode==13)
    form1.box[i+1].focus();
    return false;
    by using this the cursor is moving from first text box to second textbox and stops.
    if i use event.returnValue=false; instead of return false ,then the cursor automatically going to the laxt textbox of the column.
    my problem is how i can focus the cursor from one textbox to another textbox one after the other till the end.
    if any one has solution please help me.
    also if we can do in another way also,please help me.
    thanx.>

    thanx .u helped me so much.
    i have to check another condition. see the code below
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD>
    <SCRIPT language="Javascript">
    function fnTest(str) {
    if(event.keyCode==13) {
    if(str == 4) {
    formHeader.box[0].focus();
    else {
    formHeader.box[parseInt(str)+1].focus();
    return false;
    </SCRIPT>
    <BODY>
    <FORM name="formHeader">
    <CENTER>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('0');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('1');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="0" disabled="false" onKeyDown="javascript:fnTest('2');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('3');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('4');">
    </CENTER>
    </FORM>
    </BODY>
    </HTML>
    suppose if some of the fields are disabled,then the focus must skip to the next one.i have written disabled for box2.if the cursor focuses in box1,then the cursor should move to box3 escaping box2.
    if u know plz tell me.

  • Need help to retrieve the message from MQ using get operation

    Hi
    Used MQ adapter to Post a message to queue.
    And used Received activity in bpel to retrieve the message using MQ adapter from same queue(used get operation) , got an error message as timed
    out exception.
    Could some one assist in retrieving the message from MQ using get operation.
    Regards
    Raja

    Hi Raja,
    Is the process a empty bpel process which is used to get the message from the MQ?
    Regards
    Surya

  • Need help  to get the dID from a Webcenter TaskFlow

    Hi everyone,
    Here is a description of my need.
    I would like, in an ADF Fusion Web Application, to be able to browse the UCM content and then locate a file to get its dID. I saw that multiple ADF Task Flows exist for that, such as Documents - Document Explorer, Documents - Document Navigator, etc. None of them seems to offer this feature.
    The big picture here, is I want to select a file, within the UCM, to then link this file to a specific project in my application.
    For example :
    ProjectID 1, dID 3254234545
    ProjectID 2, dID 5465434564
    Does someone know a way for me to obtain the dID of a selected item on a "Documents - Document Explorer" taskflow?
    I have looked into taskflow customization but I don't think this could be the solution to my problem.

    I'm afraid the best available documentation is the one already provided. It is true that it does not mention explicitly if the parameter is input or output (unlike all the others it could be both), but searching for some more info and thinking about it I assume it must be an input one.
    What I found is this: http://docs.oracle.com/cd/E23943_01/web.1111/b31974/taskflows.htm
    In the text it states that: "An ADF bounded task flow consists of its own set of private control flow rules, activities, and managed beans. A caller requires no internal knowledge of such things as page names, method calls, child bounded task flows, managed beans, and control flow rules within the bounded task flow boundary. Input parameters can be passed into the bounded task flow, and output parameters can be passed out on exit of the bounded task flow. Data controls can be shared between task flows."
    This means, you could use either an output parameter (if the task flow is somehow exited - which it does not do at the moment; that's why I think the current param is an input one), or a data control.
    Read on in the document, and it seems that a data control might be a better option here. I'm afraid it leads more to the realm of ADF, so it might be better to search the ADF forum - even though, some forum users might be able to help even here.
    Another question is how to fill in this parameter. If it is not implemented, you will have to analyse the insides of the task flow. I think WebCenter Portal uses the RIDC Java API, so you will have to search where a DOC_INFO service is called (via RIDC or Web Services - note that there are few DOC_INFO services). See this link http://docs.oracle.com/cd/E23943_01/doc.1111/e11011/c04_core.htm#BABBCIEB and on for details. These services return result sets, particularly one called DOC_INFO where you can find dID to be copied to your output parameter/data control.
    I've been also thinking if dDocName would not be more appropriate - dDocName marks a content item, dID marks a revision (there might be more for one content item), but you seem to know what you need.

  • Need help in deleting the requests from DSO

    Hi All,
    I want to delete the data load requests present in the dso, I cant do that from the manage tab as it is throwing error because of some dump been loaded into it.
    Please tell me the tables names which stores these data load requests of the dso's so that I can delete those requests  in the backend.
    If is there any way to delete these requests or complete data, please let me know. I cant do these operations from the mange tab/delet data tab of dso as it is throwing the error.
    Thanks,
    vinay.

    Hi,
    You can delete the Requests form DSO by useing RSICCONT.
    Follow bellow steps:
    1. Goto SE16.
    2. Give the RSICCONT and Click on Technical Contents.
    3. Give the DSO name--> Click on Execuit
    it will dispaly the number of requests which it exists.
    4. Select your request>Select 'Table Entry' Menu> Select 'Delete'
    Regards,
    Suman.

  • Needs help to know the different versions of forms with their compatibility

    Needs help to know the different versions of forms with their compatibility with different databases and operating systems.
    Kindly give the details or any suitable link for the same.
    please consider it as on urgent basis.
    regards,
    rajesh

    Rajesh,
    the certification matrix is available on metalink.oracle.com. You need a support contract to access this information.
    Frank

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

  • I need help to remove the wrong email on my Iphone.  I can't down load app because my apple ID doese not match with the wrong email please help

    I need help to remove the wrong email on my Iphone.  the represnter who set up my phone put in the wrong email, and now I can't down loand apps on my phone because the apple ID does not match

    So sign out of the Apple ID under Settings > iTunes & App Store, then sign in with your own.

  • Need help to trace the place where error occuring in Web UI of type System

    Hi All,
    Need help to trace the place where error occurring in Web UI of type System error,
    this error coming while saving the corporate account creation,
    error message description : - System error: Interruption in Routine READ TABLE GT_CHAR_VAL, CHAR_NAME = PVTLTD_CLEAN_SEGMENT
    System error: Interruption in Routine READ TABLE GT_CHAR_VAL, CHAR_NAME = PVTLTD_CLEAN_CLASS-CP
    thanking you.
    Best Regards,
    VijHyd

    Hi Nagaraj,
    See that the mandatory SICF setting are enabled or Active in the SICF Services.  Follow the steps as below:-
    Enter the TCode SICF
    Execute the same for Hierarchy Type SICF.
    Check the following SAP Note 1295006.
    If every thing is Active then, the IC Agent role will open.
    Still if it is not opening Let me know.
    regards,
    Sarangamath

  • Need help in formatting the Date - Date does not

    Need help in formatting the Date - Date does not formats and give Not a valid month error in the below scenario.
    select oc.ST_PGM_MGR, r.ag_dnum, get_major_work_type(r.perf_eval_rtng_id) "v_work_code", r.ag_dnum_supp "supp", r.intfinal, to_char(r.formdate,'MM/DD/YYYY') "formdate", to_char(r.servfrom,'MM/DD/YYYY') "srv_from", to_char(r.servto,'MM/DD/YYYY') "srv_to", descript, add_months(to_char
    --- Bellow line of Code on trying to format it to mm/dd/yyyy gives the error
    (r.formdate, 'DD-MON-YYYY'),12) "formdate2"
    from  table REdited by: Lucy Discover on Jul 7, 2011 11:34 AM
    Edited by: Lucy Discover on Jul 7, 2011 1:05 PM

    Your syntax is wrong - look at the post above where this syntax is given:
    to_char (add_months(r.formdate,12), 'MM/DD/YYYY') "formdate2"Look at the formula from a logical perspective - "inside out" to read what is happening -
    take formdate, add 12 months
    add_months(r.formdate, 12)then apply the to_char format mask - basic syntax
    to_char(date, 'MM/DD/YYYY')Compare to your syntax:
    to_char(add_months(r.formdate, 'MM/DD/YYYY'),12) "formdate2"You will see your format string inside the call to add_months, and your 12 inside the call to to_char.
    Good luck!

  • Need help in understanding the error ORA-01843: not a valid month - ECX_ACT

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

  • I need help transferring Bootcamp (Windows XP) from my old Macbook Pro to the new one. How do I make bootable clone of Bootcamp?

    Hi I just got a new MacBook Pro I need help transferring Bootcamp (Windows XP) from my old Macbook Pro to my new Macbook Pro  Mac OS X 10.7.4  2.6 Ghz Intel Core 17. How do I make bootable clone of Bootcamp?

    you can't just move XP even if you took the hard drive and have Windows boot and function.
    Apparently there are Windows tools to sanitize the OS and strip all the motherboard drivers and services.
    Time to get a supported OS. Don't want to pay, then use 8 for the time until it goes on sale.
    There are no drivers for even Vista on 2011 and later Macs.

  • I Need Help to Access The Source Code From A Form to Know the Calculation Formula

    Hi,
    I Need Help to Access The Source Code From A Form to Know the Calculation Formula. The application is a windows form application that is linked to SQL Server 2008. In one of the application forms it generates an invoice and does some calculations. I just
    need to know where behind that form is the code that's doing the calculations to generate the invoice, I just need to get into the formula that's doing these calculations.
    Thank you so much.

    Hi, 
    Thanks for the reply. This is a view and [AmountDue] is supposed to be [CurrentDueAmount] + [PastDueAmount] - [PaidAmount]. The view is not calculating [PaidAmount] right . Below is the complete code of the view. Do you see anything wrong in the code ?
    Thanks. 
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [iff].[FacilityFeeID], [LoanID] = NULL, [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_fee].[SectionType], [Name]
    = [iff].[Name], [ReceivedAmount], [dates].[CurrentDueAmount], 
                          [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply reset to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN 0 ELSE
    [pastdue].[PastDueFeeAmount] END, [PaidAmount] = CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN - [pastdue].[PastDueFeeAmount]
    ELSE 0 END, [AmountDue] = [unpaid].[UnpaidFeeAmount], [ID] = [iff].[FacilityFeeID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_FacilityFee] iff ON [if].[ID] = [iff].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_fee].[ID],
    [sis_fee].[SectionTypeCode], [SectionType] = [st_fee].[Name], [sis_fee].[INV_FacilityFeeID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_fee JOIN
                   [dbo].[INV_SectionType] st_fee ON [sis_fee].[SectionTypeCode] = [st_fee].[Code]
                                WHERE      [INV_FacilityFeeID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_fee ON [iff].[ID] = [isis_fee].[INV_FacilityFeeID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedFeeAmount]), 
                   [ReceivedAmount] = SUM([iffa].[ReceivedFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_fee].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     *
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [SectionID],
    [PastDueFeeAmount] = SUM([PastDueFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_loan].[SectionType], [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount], [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount], 
                          0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount],
    0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, 
                          [PaidAmount] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN 0 ELSE CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END END, 
                          [AmountDue] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN [CurrentDueAmount] ELSE [unpaid].[AmountDue] END, [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_loan ON [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[ExpectedPrincipalAmount]), 
                   [ReceivedAmount] = SUM([ReceivedPrincipalAmount])
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidPrincipalAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDuePrincipalAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = 'PIK Interest Applied', [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount] = - [dates].[CurrentDueAmount], 
                          [PastDueAmount] = - CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, [PaidAmount] = - CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END, [AmountDue] = - [AmountDue], [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL' AND [sis_loan].[SectionTypeCode] = 'LOAN_INT_PIK') isis_loan ON 
                          [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                   [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]

  • I have tried everything I know to retrieve the iPhoto Library app.  I detest this new Photo app, which obviously wasn't designed with photographers in mind.  I desperately need help in retrieving the old app and have not been able to do it so far.

    I have tried everything I know to retrieve the iPhoto Library app.  I detest this new Photo app, which obviously wasn't designed with photographers in mind.  I desperately need help in retrieving the old app and have not been able to do it so far.  I have gone to my app folder and tried to update my iPhoto Library.  I have gone to my trash and brought it over to my desktop and still cannot use it.  Please help!

    Try this fix discovered by User photosb189:
    From Finder, hold down the option key on your keyboard and click on the Go menu at the top of the screen
    Select Library from the drop down menu
    Then navigate to Application Support > iLifeAssetManagement > assets
    Right click on the 'sub' folder and choose Compress
    Drag the resulting zip file to your Desktop (as a backup)
    Go to your System Preferences and choose iCloud
    Turn OFF the iCloud Photos option
    Go back to Library > Application Support and DELETE the iLifeAssetManagement folder
    Now, in System Preferences, turn the iCloud Photos option ON
    iPhoto should now be able to launch. Give it enough time to re-download your Photo Stream content. if you are missing any of your My Photo Stream photos (more than 30 days old), unzip the sub folder on your desktop and drag that into iPhoto.

  • Need help in generating the ranks

    Hi,
    I need some help in generating the ranks from 1 to 6 for each order_id
    based on the item_cnt
    Order_Id 100 with the Item_cnt 217,112,89,76,55,39 to be ranked from 1 to 6
    Order_Id 200 with the Item_cnt 29,25,22,19,13,13 to be ranked from 1 to 6
    Order_id 300 with the Item_cnt 15,7,6,6,6,4 to be ranked from 1 to 6
    SOURCE DATA TABLE : ORD_TEST
    ORDER_ID ORDER_IN_DATE ORDER_OUT_DATE ITEM_CNT
    100 9/11/2012 9/12/2012 217
    100 9/13/2012 9/15/2012 112
    100 9/14/2012 9/17/2012 89
    100 9/13/2012 9/16/2012 76
    100 9/12/2012 9/15/2012 55
    100 11/9/2012 11/18/2012 39
    100 9/14/2012 9/18/2012 37
    100 9/20/2012 9/22/2012 32
    200 11/9/2012 11/18/2012 29
    200 9/13/2012 9/15/2012 25
    200 9/12/2012 9/15/2012 22
    100 9/12/2012 9/14/2012 22
    100 9/13/2012 9/17/2012 20
    200 9/14/2012 9/17/2012 19
    100 9/14/2012 9/16/2012 19
    100 9/13/2012 9/18/2012 18
    100 9/12/2012 9/19/2012 15
    300 9/11/2012 9/12/2012 15
    200 9/12/2012 9/16/2012 13
    200 9/22/2012 9/29/2012 13
    200 9/13/2012 9/17/2012 12
    200 10/5/2012 10/8/2012 9
    300 9/12/2012 9/18/2012 7
    300 9/12/2012 9/17/2012 6
    300 10/6/2012 10/10/2012 6
    300 4/25/2013 4/27/2013 6
    300 10/6/2012 10/9/2012 4
    300 9/16/2012 9/23/2012 2
    100 10/5/2012 10/8/2012 1
    200 9/11/2012 9/12/2012 1
    QUERY OUTPUT NEEDED IS
    ORDER_ID ORDER_IN_DATE ORDER_OUT_DATE ITEM_CNT RNK
    100 9/11/2012 9/12/2012 217 1
    100 9/13/2012 9/15/2012 112 2
    100 9/14/2012 9/17/2012 89 3
    100 9/13/2012 9/16/2012 76 4
    100 9/12/2012 9/15/2012 55 5
    100 11/9/2012 11/18/2012 39 6
    200 11/9/2012 11/18/2012 29 1
    200 9/13/2012 9/15/2012 25 2
    200 9/12/2012 9/15/2012 22 3
    200 9/14/2012 9/17/2012 19 4
    300 9/11/2012 9/12/2012 15 1
    200 9/12/2012 9/16/2012 13 5
    200 9/22/2012 9/29/2012 13 6
    300 9/12/2012 9/18/2012 7 2
    300 9/12/2012 9/17/2012 6 3
    300 10/6/2012 10/10/2012 6 4
    300 4/25/2013 4/27/2013 6 5
    300 10/6/2012 10/9/2012 4 6
    Below is the script
    CREATE TABLE ORD_TEST (ORDER_ID NUMBER, ORDER_IN_DATE
    DATE,ORDER_OUT_DATE DATE, ITEM_CNT NUMBER)
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/11/2012','MM/DD/YYYY'),TO_DATE('9/12/2012','MM/DD/YYYY'),217);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/13/2012','MM/DD/YYYY'),TO_DATE('9/15/2012','MM/DD/YYYY'),112);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/14/2012','MM/DD/YYYY'),TO_DATE('9/17/2012','MM/DD/YYYY'),89);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/13/2012','MM/DD/YYYY'),TO_DATE('9/16/2012','MM/DD/YYYY'),76);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/12/2012','MM/DD/YYYY'),TO_DATE('9/15/2012','MM/DD/YYYY'),55);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('11/9/2012','MM/DD/YYYY'),TO_DATE('11/18/2012','MM/DD/YYYY'),39);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/14/2012','MM/DD/YYYY'),TO_DATE('9/18/2012','MM/DD/YYYY'),37);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/20/2012','MM/DD/YYYY'),TO_DATE('9/22/2012','MM/DD/YYYY'),32);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('11/9/2012','MM/DD/YYYY'),TO_DATE('11/18/2012','MM/DD/YYYY'),29);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('9/13/2012','MM/DD/YYYY'),TO_DATE('9/15/2012','MM/DD/YYYY'),25);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('9/12/2012','MM/DD/YYYY'),TO_DATE('9/15/2012','MM/DD/YYYY'),22);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/12/2012','MM/DD/YYYY'),TO_DATE('9/14/2012','MM/DD/YYYY'),22);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/13/2012','MM/DD/YYYY'),TO_DATE('9/17/2012','MM/DD/YYYY'),20);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('9/14/2012','MM/DD/YYYY'),TO_DATE('9/17/2012','MM/DD/YYYY'),19);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/14/2012','MM/DD/YYYY'),TO_DATE('9/16/2012','MM/DD/YYYY'),19);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/13/2012','MM/DD/YYYY'),TO_DATE('9/18/2012','MM/DD/YYYY'),18);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('9/12/2012','MM/DD/YYYY'),TO_DATE('9/19/2012','MM/DD/YYYY'),15);
    INSERT INTO ord_test VALUES
    (300,TO_DATE('9/11/2012','MM/DD/YYYY'),TO_DATE('9/12/2012','MM/DD/YYYY'),15);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('9/12/2012','MM/DD/YYYY'),TO_DATE('9/16/2012','MM/DD/YYYY'),13);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('9/22/2012','MM/DD/YYYY'),TO_DATE('9/29/2012','MM/DD/YYYY'),13);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('9/13/2012','MM/DD/YYYY'),TO_DATE('9/17/2012','MM/DD/YYYY'),12);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('10/5/2012','MM/DD/YYYY'),TO_DATE('10/8/2012','MM/DD/YYYY'),9);
    INSERT INTO ord_test VALUES
    (300,TO_DATE('9/12/2012','MM/DD/YYYY'),TO_DATE('9/18/2012','MM/DD/YYYY'),7);
    INSERT INTO ord_test VALUES
    (300,TO_DATE('9/12/2012','MM/DD/YYYY'),TO_DATE('9/17/2012','MM/DD/YYYY'),6);
    INSERT INTO ord_test VALUES
    (300,TO_DATE('10/6/2012','MM/DD/YYYY'),TO_DATE('10/10/2012','MM/DD/YYYY'),6);
    INSERT INTO ord_test VALUES
    (300,TO_DATE('4/25/2013','MM/DD/YYYY'),TO_DATE('4/27/2013','MM/DD/YYYY'),6);
    INSERT INTO ord_test VALUES
    (300,TO_DATE('10/6/2012','MM/DD/YYYY'),TO_DATE('10/9/2012','MM/DD/YYYY'),4);
    INSERT INTO ord_test VALUES
    (300,TO_DATE('9/16/2012','MM/DD/YYYY'),TO_DATE('9/23/2012','MM/DD/YYYY'),2);
    INSERT INTO ord_test VALUES
    (100,TO_DATE('10/5/2012','MM/DD/YYYY'),TO_DATE('10/8/2012','MM/DD/YYYY'),1);
    INSERT INTO ord_test VALUES
    (200,TO_DATE('9/11/2012','MM/DD/YYYY'),TO_DATE('9/12/2012','MM/DD/YYYY'),1);
    select * from ord_test order by item_cnt desc;
    Thank you

    Hi,
    That's called a Top-N Query , and here's one way to do it:
    WITH    got_rnk            AS
         SELECT    o.*
         ,       ROW_NUMBER () OVER ( PARTITION BY  order_id
                                 ORDER BY          item_cnt     DESC
                        )  AS rnk
         FROM      ord_test  o
    SELECT       *
    FROM       got_rnk
    WHERE       rnk     <= 6
    ORDER BY  order_id
    ,            rnk
    ;Analytic functions (such as ROW_NUMBER) are computed after the WHERE clause is applied. If you want tio use the results of an analytic function in a WHERE clause, then you can compute the analytic function in a sub-query (such as got_rnk above), and then use that value in the WHERE clause of a super-query.

Maybe you are looking for

  • Is there a way to automatically put CHUD into Nap mode on startup and wake?

    Using nap mode on chud helps my machine run way cooler. But nap defaults off on every restart or wake from sleep. Is there a simple way (or any way) to keep this from happening? Like some workaround with an applescript? I'm an applescript newb, so I

  • Item Master SP validation help

    Dear Experts, Please help me on creating a validation script on SP_PostTransaction. I will like to validate that if my Item master to be added is an inventory item, the item name must end with "-FAB" or "-FGT" or "-ACC". If not, prompt an error and d

  • Steps to create substitution rule for field BSEG-RECID

    MIRO generates FI document. FI document has BSEG-RECID field. I need to apply substitution for BSEG-RECID depending on the value of the RSEG-GEBER field in MIRO. The substitution must be activated only if account to be booked is PL account in FI and

  • Getting this error when saving: Names longer than 31 characters are not supported on the destination volume

    I've just tried to save a document in Pages and got this error Names longer than 31 characters are not supported on the destination volume Never had a problem like this before. I haven't changed disks or formatted disks. Running latest Yosemite 10.10

  • Dual Graphics cards 7300 & 8800 in 1st gen

    Does it work to have both video cards in my mac pro. so i can dual boot. the newly released 8800 gt only works w/ leopard. so i plan to install leopard on a seperate drive. and then just use the original 7300 card for tiger? anyone know?