Needs another simple fix ! ( Sorry guys i was stuck w/something else! )

Hi Guys,
What i m trying to do here is to sum all the transactions of current month from one table and get the balance of highest date of previous month from other table for a specific agent. I only want one single value. I wrote something (below) but it doesn't work. Please help me out; thnx
Select (Sum(a.Dollar)+(c.Balance)) Outstanding
From Sajjad.Agent_Trans a, Sajjad.Agent b, Sajjad.Agent_Payments c
Where a.Id = b.Id
And b.Source = c.Source
And b.Source = 'IQ'
And c.Pdate = (Select Max(Pdate)
From Sajjad.Agent_Payments
Where Source = 'IQ'
And Pdate Between Last_Day(Add_Months(Sysdate,-2)) + 1
And Last_Day(Add_Months(Sysdate,-1))
Group By c.Balance
Message was edited by:
imatif
Nobody dare to take this challenge ! Strange...
Message was edited by:
imatif
Message was edited by:
imatif
Message was edited by:
imatif
sorry Guys i was stuck with somethng else and i thought that i have given enough intro to my problem. Anyways it was given me NO ROWS SELECTED msg. then i noticed that if i wrote pdate as To_Char(Pdate,'dd/mm/rr') = ... in all my query only than it gives result. But why i have to write like this ? As a side note i m taking input through this select statement (select sysdata into pdate from dual;) in my forms.
Message was edited by:
imatif
Message was edited by:
imatif

<quote>
i noticed that if i wrote pdate as To_Char(Pdate,'dd/mm/rr') = ... in all my query only than it gives result. But why i have to write like this ?
</quote>
Look at the constraints on your subquery:
SELECT   (SUM (a.dollar) + (c.balance)) outstanding
    FROM sajjad.agent_trans a, sajjad.AGENT b, sajjad.agent_payments c
   WHERE a.ID = b.ID
     AND b.SOURCE = c.SOURCE
     AND b.SOURCE = 'IQ'
     AND c.pdate =
           (SELECT MAX (pdate)
              FROM sajjad.agent_payments
             WHERE SOURCE = 'IQ'
               AND pdate BETWEEN LAST_DAY (ADD_MONTHS (SYSDATE, -2)) + 1
                             AND LAST_DAY (ADD_MONTHS (SYSDATE, -1)))
GROUP BY c.balance;Examine the values you're looking between:
SQL> SELECT to_char(LAST_DAY (ADD_MONTHS (SYSDATE, -2)) + 1, 'yyyy-mm-dd hh24:mi:ss') AS d1,
  2         to_char(LAST_DAY (ADD_MONTHS (SYSDATE, -1)), 'yyyy-mm-dd hh24:mi:ss') AS d2
  3    FROM dual;
D1                  D2
2005-08-01 09:42:06 2005-08-31 09:42:06When you perform your to_char() conversion you're throwing away the hours/minutes/seconds components of the date. This may be what you're trying to do.
SELECT   (SUM (a.dollar) + (c.balance)) outstanding
    FROM sajjad.agent_trans a, sajjad.AGENT b, sajjad.agent_payments c
   WHERE a.ID = b.ID
     AND b.SOURCE = c.SOURCE
     AND b.SOURCE = 'IQ'
     AND c.pdate =
           (SELECT MAX (pdate)
              FROM sajjad.agent_payments
             WHERE SOURCE = 'IQ'
               AND pdate >= LAST_DAY (ADD_MONTHS (TRUNC(SYSDATE), -2)) + 1
               AND pdate < LAST_DAY (ADD_MONTHS (TRUNC(SYSDATE), -1)) + 1
GROUP BY c.balance;Oh, and it took me a bit to realized that you'd updated your initial post instead of adding a new one. I suspect that many folk look only at the newest posts instead of scrolling though all of the existing ones looking for changes that may have been made to them.

Similar Messages

  • How can I get rid of Bing?  It was attached to something else I downloaded and now every time I click something, an ad pops up.

    How can I get rid of Bing?  It was attached to something else I downloaded and now every time I click something, an ad pops up.

    Click here and run the tool.
    (112348)

  • Hi, I'd like to ask this question again and see if I didn't make my needs clear enough. Sorry if I was vauge before but this should help. I need to sync my old mac to my new one.

    Here's my problem...The latest version of Quicktime as new as it sounds doesn't support screen recording on a powermac G5 Motorola chip with OS 10.5.8 which is the highest os I can go with that machine. If I can sync the two computers so I can get the application to record from my newer computer then I'm ok. I just don't have the recording application for audio that I'm using to demo for the website on the laptop as it's about 10,000 dollars. So, I have to use the older computer to do the audio presentation and try to get the newer computer synced to it so I can use the new version that works on snow leopard to record a screen shot that will hopefully appear on my laptop instead of the old machine. Hope that makes sense. It's a bit confusing but in a nutshell it's like this:
    1. I am a Pro Tools Instructor which is the state of the art application and recording device for audio and movie scoring and I have a new job where I make small snippets of tips using Pro Tools which I'd like to record with quicktime on screen as they happen
    2. the best version of Quicktime Pro available for the Power Mac, OS 10.5.8 will not do screen recording on it.
    3. I can use the Quicktime application from my newer laptop but I need to sync it to the old machine
    4. I'm hoping but I don't know, if I do this, that I can record Pro Tools in action from my new machine buy seeing it on this laptop screen and then recording it with the new quicktime.
    5. If I can sync the two computers, I'm hoping this can happen but I can't use my ethernet connection as I have it used to connect to my recording console and can't afford to buy anything new like an ethernet hub yo connect the two so I'm hoping that there's another way to connect them.
    I hope that makes sense and that possible you or someone else can help. Thanks so much! Scott

    Please try the action I supplied in my post.
    If you untick the search Entire library
    Then type in your search term it will give the list of songs in the main window

  • Need advice with video editing from iphoto to imovie, or something else.

    ok, here's the deal. I have about 1tb of videos(in raw iphone straight to iphoto format), about 3k of them.  I took a few vids a day for a year or so. They are all in iphoto right now but i need to take each days vids and put them together and export that in a smaller format.  I need to do that for each day of the year.  But it's a nightmare trying to get the vids from iphoto to imovie.  Is there an easy way?  I don't want to do major work to them, i just want to put them all together and have 1 vid file.  So say I have 3 vids on jan 1st in iphoto, I need to move all 3 to another app, put them together, export the single file, keeping as much of the quality as I can, then I can delete the original raw vids and move that single file back to iphoto.
    So instead of having events with lots of videos inside them, 1 event per day, 1 video.
    any ideas on a quick and easy way to do this?

    iMovie is the tool for that job and it's video so there are no "quick and easy ways", I'm afraid. The files are huge and it takes time.
    What nightmare are you having getting the material from iPhoto to iMovie?
    As there is a lot of repetition in the process you describe, have you considered using Automator to try and do some of the heavy lifting for you?
    Regards
    TD

  • I can't run any of the apple programs. Running windows 7 32 bit.I tried everything for hours and nothing.I Installed, Uninstalled a 1000 times and always getting the same results;errors.I think you guys have a bug or something else. Help please. T.Y.

    Itunes 10.5.1, Safari, Quicktime, won't install... windows 7 32 bit... when I try to open any of the software it crash... I need it for my Ipad2 but nothing is working... I tried all the help from the communities but nothing... I disable firewall, windows deffender, fix registers and nothing... any help will be appreciated...
    I don't know if there is a bug in your sofware or is not ready for windows yet... Thank you...

    Can someone please respond to my request for support?  I tried the provided correct answer at https://discussions.apple.com/message/11561783#11561783  but it did not work. 
    I also got a MSFT tech support person to remotely look at my machine, for what its worth, he said the registry file is fine and to contact Apple support.
    Any help would be very much appreciated.

  • I accidentally found a .PDF file using Spotlight while I was searching for something else. However, I can't find the location of the file.

    While I was using Spotlight to search for an app. I came across a .PDF file related to my job. However, it's not in the finder nor in the documents folder. As matter of fact, it's not even listed in the PDF files section. I can open it using Spotlight.....but I can't find it. It it on my Inbox? Do I have files lurking around in my computer without me knowing about them? Also I don't remember downloading said file. It's not harmful it's just a simple 32-page .PDF file that contains information on my company policies. But where is it and how did get there?

    If you hold down the option key, it will typically show the location. Or you can often hit option-return on the file and it will reveal the file in the Finder, instead of opening it.
    Final option is to open it, and just option-click the filename in the toolbar of Preview and it should show you the location.
    It's probably an attachment to an email you've received. If you have Mail set to cache emails and their attachments it'll be stashed in a subdirectory of ~/Library/Mail. Which is fine.

  • Ipod touch not working properly. need help on wether or not to replace battery or something else.

    My iPod touch 4th generation 8g is acting up. when i touch an app, it loads like normal but then goes black for about 2 seconds then returns to the normal screen where all the apps are. my music won't play for a long amont of time either (for example about 5 to 10 min.) without going black and freezing for about 2 seconds and returning to the regular scree. my 90 day warrenty has been up for a while and i was wondering if it could possibly be the battery and maybe i should just get the battery replaced, or if any of you have suggestions, i am all ears! Help! and the Apple service company was no help and said i had to buy a package plan in order to get phone service!

    The warranty is for one year unless you purchased AppleCare which extends it for a total of two years.  The 90 days is for free phone support.
    Try in order:
    - Reset the iPod,  Nothing will be lost,
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Restore the iPod from backup via iTunes onthe computer
    - Restore the iPod to factory defaults/new iPod, also via iTunes
    If you still have a problem then you likely  have a hardware problem and make an appointment at the Genius Bar of an Apple store. If defective, you should walk out with a refurbished iPod.
    For how to restore, see the restoring topic of:
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • HT201263 my iphone 4s i unresponsive. the screen was stuck on something and now it's black

    Hi, my iphone 4s suddenly froze and became unresponsive on the home screen. now it's asleep and it doesn't respond - it's black. If i press on the home siri sometimes says something. I can hear incoming calls and it works - the screen is just black.
    The thing is my off/ on botton is not working too.
    I triend to force restore iphone - but it says i have to turn off "find my iphone" first so I can' do that.
    Hope someone can help!!
    Thanks!

    Hi mfiphone98,
    If your iPhone is has a black screen, but you are hearing sounds and Siri, you may have inadvertantly activated an Accessibility feature known as Screen Curtains. You may find the following helpful (page 130):
    Turn the screen curtain on or off. Triple-tap with three fingers. When the screen curtain is on, the screen contents are active even though the display is turned off.
    iPhone User Guide For iOS 7.1 Software
    http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    Regards,
    - Brenden

  • My Sons Ipod touch keeps coming up showing Low Memory ??? Is there a Simple Fix and How to Delete all the Pages it has Created in Doing so ??? Any Help would be more than Appreciated to Repair this Problem and getting it working back to 100% ... Thank You

    My Sons iPod Touch Recently Reads Low Battery all the Time now Since downloading and Playing COD ...  Is there a Simple Fix for this ???                       Or Something I need to do to Correct it and Also to Possibly Erase all the Low Battery Error Pages it has Created ???  Maybe he needs to Catorogize them or ???  Not Really a Electronics Wizz  or up to date on My iPod Electronics and Repair ...  Just trying to get his iPod back working to 100% again ... Any Help or Direction would be Greatly Appreciated ,,, Thank You,,, Brian  : )

    If the memory is low, double click the home button to bring up the multitask bar, tap on one of the apps shown until they start to shake, then hit the little red minus to close them. After all apps are closed that way, press the home button again and see if it works now.
    Maybe you'll reset the device as well by pressing the home and sleep button for about 10sec, until the Apple logo comes back again. You will not lose data doing this, but it can clear some glitches as well.

  • I need to know how to fix my iphone4 I was playing one of my games and a up date poped up and i push it to up date my phone. When it restarted all I have is a white screen and four black dots and all the driffent laughes I can not make any or get any call

    I need to know how to fix my iphone4 I was playing one of my games and a up date poped up I pushed on the up date when it restarted all I have is a white screen with four black dots and all the driffent laughes and a i with a blue circle around it I can not make any calls or get any calls or any thing

    I don't have apps on my phone so i can;t do anything

  • [svn:fx-trunk] 11641: A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks , not just alpha masks.

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • HT1206 I can't log into the Itunes store.  I type in my Apple ID and my password and the message "This Apple ID cannot be used for the iTunes Store." "Enter another Apple ID."  I need help on fixing this.

    I can't log into the Itunes store.  I type in my Apple ID and my password and the message "This Apple ID cannot be used for the iTunes Store." "Enter another Apple ID."  I need help on fixing this.

    Yeah I'm starting to see a ton of forums posts right now about the same thing :/ I wonder what's going on

  • Hey guys, I was wondering ... is there a big difference between the 16 gig ram and the 8 gig for the retina series?? hardest thing I do on a laptop is play need for speed on 1080p resolution.... thanks

    hey guys I was wondering ... will there be a big difference between the 8 gig and 16 gig versions of the pro retina series??? the hardest thing i do is play need for speed and program using c++...thanks

    That RAM is soldered in. No sockets. No upgrading later.
    Your question is:
    ¿Will I EVER need the 16GB in the time I expect to own this MacBook?
    --NO, save $200 and if you ever run short, sell the machine and buy a different one.
    --ELSE, spend the extra US$200 and don't think about it again.

  • HT201365 I just buy ipad 4 from guy which was posted on cragslist and I couldn't activate coz ipad is still link with previous owner and I tried to contact guy but won't answer so what can I do need help with .it ask me to enter Apple ID of previous user

    I just buy iPad 4 from guy which was posted on Craigslist and I got problem in activation process . It ask me to enter previous iPad user   Apple ID and password to get access . And I tried to contact that guy for user I'd and password  but he won't answer me .so anybody have idea how to solve this problem 

    onyok13 wrote:
    ... i cant use the iphone that i bought from a local buy, swap and sell site.... i just wanna ask you people what else can i do with it to be activated again,
    The Apple ID and Password that was Originally used to Activate the iDevice is required
    If you do not have that information you will not be able to use the Device.
    Activation Lock in iOS 7  >  http://support.apple.com/kb/HT5818

  • A simple fix to the "No Content" error after updating to iOS 4.2.1.

    I had the same problem that others are reporting after updating an iPhone to iOS 4.2.1 where all of my media disappeared. However I don't currently have access to my PC to sync with iTunes but have posted a really simple fix that worked for me here:
    http://vextasy.wordpress.com/2010/11/30/a-very-simple-solution-to-the-iphoneipod -4-2-1-update-no-content-problem/
    The advantage of this fix is that it doesn't need you to use iTunes which was important for me as I am currently away from my PC. I fixed my iPhone this way and I suspect the same would work on an iPod Touch or iPad.

    You can only sync to one iTunes library but you can manage music and videos among different computer/libraries.
    It appears that you are trying to sync with a different library.
    - If you want to make the Mac you syncing computer:
    --- Connect the iPod to the computer and make a backup by:
    iOS: How to back up
    --- Restore the iPod from that backup. Note that synced media like apps and music are not in included in the backup.

Maybe you are looking for

  • CS5 and DW curly quotes

    I just upgraded from CS4 to CS5. Dreamweaver used to convert curly quotes to the proper UTF encoding when you typed them in. For example, if you typed the Option-Shift-leftbracket keys you would get “ in your code. This no longer happens with CS5. It

  • Error while creating financial application

    i have installed hyperion 11.1.1.4 on windows server 2008 R2, with sql server 2005 as my database server. when i login into workspace and tried to create the HFM appication iam getting the following error. hyp:19000/hfm/GlobalWorkspaceNav/bpm/modules

  • Add a date on a photo

    Please I want to help me. It is important for me to add the date of a photo to be viewed on printing. Or maybe if it is possible to put the date by myself like a word on the photo. My camera is EOS 7D Thanks in advance

  • Can't open URLs in outlook 2010 email. Works OK when IE is default browser. URL opens properly when I paste it into FF.

    Running Win 7, Outlook 2010 and FF 3.6.15. I used to have no problem clicking URLs in Outlook messages, but now, when FF is default browser, I get message: "General Failure. The url was: "http://.....". An error occurred sending the command to the ap

  • Passing value to ref cursor

    Hi, I have a doubt in the code mentioned below ..indicated in the code by " -- id shoud be the value fetched from variable v_samp;". I am not sure of how I get the value into the ref cursor from the variable declare Cursor C1 Is Select Table_Name,Row