Need Help to update the labels in the GUI syncronously - Swing application

Hello everyone,
I need some help regarding a swing application. I am not able to syncronously update the counters and labels that display on my Swing GUI as the application runs in the background. But when the running of application is completed, then the labels on the GUI are getting updated, But I want update the labels and counters on the GUI syncronously as the code executes... below I am giving the format of the code I have written..............
public class SwingApp extends JFrame{
        // here i have declared the label and component varibles like...
                  private JTextField startTextField;
       private JComboBox maxComboBox;
       private JTextField logTextField;
       private JTextField searchTextField;
       private JLabel imagesDownloaded1;
       private JLabel imagesDownloaded2;
       private JLabel imagesDidnotDownload1;
       private JLabel imagesDidnotDownload2;
                  private JButton startButton;
//now in the constructer.............
public Swing(){
//I used gridbaglayout and wrote the code for the GUI to appear....
startButton = new JButton("Start Downloading");
    startButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try{
             actionSearch();   //actionSearch will contain all the code and the function calls of my application...........
        }catch(Exception e1){
             System.out.println(e1);
    constraints = new GridBagConstraints();
    constraints.gridwidth = GridBagConstraints.REMAINDER;
    constraints.insets = new Insets(5, 5, 5, 5);
    layout.setConstraints(startButton, constraints);
    searchPanel.add(startButton);
//update is a function which initiates a thread which updates the GUI. this function will be called to pass the required variables in the application
public void update(final int count_hits, final int counter_image_download1, final int didnot_download1) throws Exception{
     Thread thread = new Thread(new Runnable() {
         public void run() {
              System.out.println("entered into thread");
              System.out.println("the variable that has to be set is " + count_hits);
              server_hits_count.repaint(count_hits);
              server_hits_count.setText( " "+ Integer.toString(count_hits));
              imagesDownloaded2.setText(" " + Integer.toString(counter_image_download1));
              imagesDidnotDownload2.setText(" " + Integer.toString(didnot_download1));
              repaint();
     //this.update(count_hits);
     thread.start();
//Now in main............................
public static void main(String[] args){
Swing s = new Swing();
s.setVisible(true);
}//end of main
}//end of class SwingAbove I have given the skeleton code of my application........ Please tell me how to update the GUI syncronously...
Please its a bit urgent...............
Thank you very much in advance
chaitanya

First off, note that this question should have been posted in the Swing section.
GUI events run in a separate thread (the AWT / Event Dispatch Thread) than your program.
You should be invoking AWT/Swing events via SwingUtilities.invokeLater().
If for whatever reason you want to have the program thread wait for the event to process
you can use invokeAndWait().
http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html

Similar Messages

  • Need help with setting the entry point for application

    Hi there,
    I am kinda new to creating JAR files for application. I checked out the tutorials for creating the jar files, and I understood most of the concepts. There is one part in the tutorial which I still don't understand
    it says:
    We want to execute the main method in the class MyClass in the package MyPackage when we run the JAR file.
    We first create a text file named Manifest.txt with the following contents:
    Main-Class: MyPackage.MyClass
    I am not exactly sure what the package is. Is it the name of the jar file, which I wish to create? Your detailed explanation would certainly be helpful. Thank you in advance.
    Regards,
    Young

    Hi there,
    I am kinda new to creating JAR files for
    for application. I checked out the tutorials for
    creating the jar files, and I understood most of the
    concepts. There is one part in the tutorial which I
    still don't understand
    it says:
    We want to execute the main method in the class
    s MyClass in the package MyPackage when we run the
    JAR file.
    We first create a text file named Manifest.txt with
    the following contents:
    Main-Class: MyPackage.MyClass
    I am not exactly sure what the package is. Is it
    it the name of the jar file, which I wish to create?
    Your detailed explanation would certainly be helpful.
    Thank you in advance.
    Regards,
    YoungIts just the package name in your code hierarchy.
    http://jarticles.com/package/package_eng.html

  • I need help in making the programe which updates our code into client machi

    I need help in making the programme which updates our code into client machine from the server.
    As yahoo messanger does if there is any updated version of yahoo messanger.
    It asks when we login into it do you want to update new version of yahoo messanger
    It automatically updates it
    Need Help??

    Sounds to me like you need Java Web Start.

  • 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 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.

  • Help with updates - The software change returned error code 0x87D00215(-2016411115).

    I have rolled out bunch of updates across few hundred workstation systems.
    Few of the desktops have failed to install SOME of the updates and just can't get my head around as to why?
    Looking at one of the workstations, I can see 5 updates are pending download at 0%.
    Some of these fail after a while and with in Software Centre, I can see 'Help with updates - The software change returned error code 0x87D00215(-2016411115).'. Not exactly sure what this means, but I have tried clearing the cache and
    rebooting the workstations few times.
    (I have also tried to use Windows Update and install one of these manually, which worked.)

    Investigating this further, I have found the following in CAS.log:
    ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Successfully created download request {ED6E9E5C-E806-43CA-9F93-49AC72D1DEAD} for content 53bf87a2-bedf-4def-b0ec-9637613c3429.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting locations synchronously for content 99ddb078-b780-4605-8fac-9607fe56450d.1 with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    The number of discovered DPs(including Branch DP and Multicast) is 1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Calling back with the following distribution points ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Distribution Point='http://DPSERVER.com/SMS_DP_SMSPKG$/99ddb078-b780-4605-8fac-9607fe56450d', Locality='LOCAL' ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting content 99ddb078-b780-4605-8fac-9607fe56450d.1, size(KB) 0, under context System with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Successfully created download request {67B7E59B-A386-4EA8-BF39-2EB64B108A6C} for content 99ddb078-b780-4605-8fac-9607fe56450d.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting locations synchronously for content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1 with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    The number of discovered DPs(including Branch DP and Multicast) is 1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Calling back with the following distribution points ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Distribution Point='http://DPSERVER.com/SMS_DP_SMSPKG$/61d33de7-9582-41e3-82fc-3e0f970b60f3', Locality='LOCAL' ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1, size(KB) 0, under context System with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Successfully created download request {12E48136-B545-4C42-9745-9FF97CE38D52} for content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)

  • 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 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]

  • When i go to the app store to update the one app that needs to be updated, the screen is blank.  It used to list all the apps that need updating and have a button called update all.  Now nothing.  Just a blank screen.

    when i go to the app store to update the one app that needs to be updated, the screen is blank.  It used to list all the apps that need updating and have a button called update all.  Now nothing.  Just a blank screen.  How can I fix this?

    There's been a problem with this all day.  Seems to be a server problem  -  wait a day and try again, or use itunes on the computer to update, that works.

  • Need help in finding the number of occurrences of a pattern.

    Hi All,
    I need help in finding the number of occurrences of a pattern in a table's column's data.
    Consider sample data - one row's column from a table:
    "S-S-S-A-S-S-P-S-S-B-S-A-P-S-S-C"
    My requirement is:
    I should get the count of S's which are immediately preceded by A or P.
    for the above data i should get count as 3+2+1=6 (S-S-S-A, S-S-P, S-A)
    The pattern data is stored as VARCHAR2 type.
    Thanks in advance,
    Girish G
    Edited by: Girish G on Jul 21, 2011 11:22 PM

    I am sure there exists a better way then this one:
    SQL> with dt as
      2  (select 'S-S-S-A-S-S-P-S-S-B-S-A-P-S-S-C' str from dual)
      3  SELECT SUM(Regexp_count(Regexp_substr(str, '(S\-?)+(A|P)+', 1,
      4                                     Regexp_count(str, '(S\-?)+(A|P)+') - (
      5                                                  LEVEL - 1 )), 'S')) len
      6  FROM   dt
      7  CONNECT BY LEVEL <= Regexp_count(str, '(S\-?)+(A|P)+')
      8  /
           LEN
             6

  • Need help in optimising the performance of a query

    Need help in optimising the performance of a query. Below is the query that is executed on TABLE_A, TABLE_B and TABLE_C with record counts as 10M, 10m and 42 (only) respectively and it takes around 5-7 minutes to get 40 records:
    SELECT DISTINCT a.T_ID_, a.FIRSTNAME, b.T_CODE, b.PRODUCT,
    CASE WHEN TRUNC(b.DATE) +90 = TRUNC(SYSDATE) THEN -90 WHEN TRUNC(b.DATE) +30 = TRUNC(SYSDATE) THEN -30 ELSE 0 END AS T_DATE FROM TABLE_B b
    INNER JOIN TABLE_A a ON (a.T_ID_ = b.T_ID_) LEFT JOIN TABLE_C c ON b.PRODUCT = c.PRODUCT
    WHERE b.STATUS = 'T' AND (b.TYPE = 'ACTION'
    AND ( TRUNC(b.DATE) + 1 = TRUNC(SYSDATE) ) ) AND b.PRODUCT = 2;
    Note: Indices on the join columns are available in the respective tables
    Please let me know if there is any better way to write it.
    Edited by: 862944 on Aug 18, 2011 9:52 AM

    862944 wrote:
    Need help in optimising the performance of a query. Below is the query that is executed on TABLE_A, TABLE_B and TABLE_C with record counts as 10M, 10m and 42 (only) respectively and it takes around 5-7 minutes to get 40 records:
    SELECT DISTINCT a.T_ID_, a.FIRSTNAME, b.T_CODE, b.PRODUCT,
    CASE WHEN TRUNC(b.DATE) +90 = TRUNC(SYSDATE) THEN -90 WHEN TRUNC(b.DATE) +30 = TRUNC(SYSDATE) THEN -30 ELSE 0 END AS T_DATE FROM TABLE_B b
    INNER JOIN TABLE_A a ON (a.T_ID_ = b.T_ID_) LEFT JOIN TABLE_C c ON b.PRODUCT = c.PRODUCT
    WHERE b.STATUS = 'T' AND (b.TYPE = 'ACTION'
    AND ( TRUNC(b.DATE) + 1 = TRUNC(SYSDATE) ) ) AND b.PRODUCT = 2;
    Note: Indices on the join columns are available in the respective tables
    Please let me know if there is any better way to write it.
    Edited by: 862944 on Aug 18, 2011 9:52 AM[When Your Query Takes Too Long|https://forums.oracle.com/forums/thread.jspa?messageID=1812597]

  • In installation process of Acrobat Professional 7 , its showing that Adobe Pdf printer is not Installed...need help to install the software completely

    In installation process of Acrobat Professional 7 , its showing that Adobe Pdf printer is not Installed...need help to install the software completely

    If it is Win 7 or later, the Adobe PDF printer for AA 7 will not install and AcroTray will not function. You will have to install a PS driver from Adobe or maybe an HP color PS printer driver. Then edit the driver properties and change the name to Adobe PDF and the port to FILE. You will always have to do an extra step in creating PDFs by opening the file that is created in Distiller to get the PDF.
    If you are talking about Win 8, you may not be successful at all. If you got Acrobat and Distiller to install, then there is a chance.

Maybe you are looking for