Problem with record count...

Hi,
I try to solve one problem with count. This problem occurs when I getting multi records that I need to count. Take a look on the following query:
SELECT INVOICE,COUNT(INVOICE)
FROM TABLE WHERE ADDR =
(SELECT ADDR FROM TABLE
WHERE DELEVERY = 'DD'
GROUP BY ADDR||POSTDT
HAVING COUNT(DISTINCT ADDR||POSTDT) > 1)
GROUP BY INVOICE;
I expected to see each invoice with total count invoices that have been delivered to the same address and date. But it's give me only invoice and count 1(itself), regardless if two or more invoices have been delivered to the same address and the same date. I think, that I just lost myself in this query. Hopefully I gave enough information.
Thanks in advance,
Alex

Hi Alex,
there are a couple ways to code this. Just two of them:
SELECT t1.INVOICE,
       t2.total
FROM   TABLE t1,
       (SELECT   ADDR,
                 POSTDT,
                 count(*) total
        FROM     TABLE t2
        WHERE    DELEVERY = 'DD'
        GROUP BY ADDR,
                 POSTDT
        HAVING   COUNT(*) > 1
WHERE  t1.ADDR   = t2.ADDR
AND    t1.POSTDT = t2.POSTDT
SELECT t1.INVOICE,
       (SELECT   count(*)
        FROM     TABLE t2
        WHERE    DELEVERY = 'DD'
                 t2.ADDR   = t1.ADDR
                 t2.POSTDT = t1.POSTDT
        GROUP BY ADDR,
                 POSTDT
        HAVING   COUNT(*) > 1
       )  total
FROM   TABLE t1

Similar Messages

  • Problem with message count

    hello ,
    I have problem with message count, in my inbox there are more than 0 messages but i got result of
    Folder inbox = store.getFolder("Inbox")
    int c =inbox.getMessageCount()
    of c is 0
    i.e i got c as zero rather than 5.

    I am seeing the same thing and I agree with MathiasF's observation.  My count seems to increase when I do a search for mail on the server.  This has happened previously (iOS 5.x) but ending the Mail app always fixed it.  The only way I can correct the count now is if I turn off sync for Mail on the Exchange account and re-enable.  This clears my mail and causes my phone to go out and redownload.  Rebooting and resetting the iPhone has not helped.
    I'm on Sprint - 32GB White iPhone 4S running iOS 6.0 (10A403)

  • Problem with recording device

    Try to use Echo/Sound test service, as well as a couple friends on the list and get the following message "Problem with recording device".  I have also searched in the community, but found many issues releated, but no solutions that fit the problem.  Headset: Turtle Beach XP SevenSkype Version: 6.22.81.105Operating System: Windows 7 Ultimate Service Pack 1; 64 - bit Tested in sound recorder, and records my voice, and able to playback and hear my horrible singing. I did find a rather odd way to resolve the issue temporarily. I also use hangouts from time to time, and when I start a video call, it will ring, and send out, and I can then call out using skype to a friend/sound test and it will work fine for the rest of the call. Able to talk, and do whatever.  Unfortunatley, with the listed method above I have to repeat the process everytime I want to make a call, or accept someones call. Rather... Annoying. Any solution to this, or what can be causing this issue?  

    I suggest  you download and install the latest generic Realtek audio drivers as they should be compatible with the computer model you listed in a previous post.  I run a similar model to that one and have no issues with it.  Skype is rather resource intensive on that netbook when participating in video calls due to the limitations of the processor and onboard video chipset. The latest generic Realtek audio drivers (Select "High Definition Audio Codecs" - 32 bit Windows 7)http://www.realtek.com/downloads/okay, i have pretty much given up trying to use Skype on this netbook but i came back to report the known data just in case anyone else might find it useful. to begin with 1) let's get this upfront. i am ignorant, ill-informed, tech-illerate and stupid. i stipulate to this going in. i've NO idea what the hell i'm doing. 2) hardware = ASUS eeePC1005HA, Win7Starter32, 1G DDR2, Intel Atom280, 250GHDD 3) per the above suggestion i went to the RealTek site and looked for the driver, but first 4) i had SlimDriver look around for me and it said there was a newer driver (i think dated 2011) which i had it download & install 5) so that didn't seem to make the slightest difference in Skype performance (i.e. none) so 6)as in (3) above i went to http://152.104.125.41/downloads/downloadsView.aspx?Langid=1&PNid=24&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false and it offered me 2 choices of sites from which to download Version R2.78 for 32bit Win7 so i picked one at random and it downloaded 2 files, 1 a .exe and the other a PART which i have no idea what the hell that is. i barely know enuf to double clic on the filename in WinExplorer Downloads so that's what i did first on the .exe file cuz that one had a file size greater than zero (unlike the PART file) and got an error message saying Win7 didn't know what to do with this file and could i please suggest a software to use on it. 7) so i deleted it and started over with the same result and then i repeated step 7) only this time i got only the .exe file in my Downloads folder and when i double-clicked it i actually got the Install Wizard to run. 9) so while the Wizard was running i went and looked in my "Windows 7 In Depth" by Cowart & Knittel and found nothing in the index under RealTek so i went and looked at Drivers and based on clues i found there i went to Control Panel ->Hardware & Sound -> Device Manager ->RealTek HD Audio [hidden under expandable Processors - Sound, Video & game conrollers]->(LeftClick to get Update Driver Software), and wait about a year and a half for 'Onliine Search for Software', followed by the message "the best driver software for your device is already installed". 9)so by this time the Install Wizard has finished Uninstalling the previous version of the driver and wants me to RESTART and that's right now in real time so i am now closing this browser and if i ever finish restarting i will continue this response in a new reply window starting with step (10), whatever that turns out to be. the suspense is killing me.

  • Windows 10 Calls dropped problem with recording device

    I now there are others experiencing this issue. Though, however not only when either I call someone or they call me the call drops and "problem with recording device" error message is displayed. It is also stating to those trying to call me or answering my call that I can only accept IMs.Can someone please help as its starting to become a complete waste of my time. I am running Windows 10 and Skype Version: 7.7.0.103  

    Please, run the DirectX diagnostics tool (32-bit). Run dxdiag.exe (Start - Run or Win key +R) then press enter or click "OK". Once the diagnostics completes, "Save All information..." to a text file. Please, attach this file to your post. Be aware that you will have to zip this file before attaching it here.
    (i.e. compress DxDiag.txt ---> DxDiag.zip) 

  • Skype Problem with recording device

    After the windows 10 update it keeps saying "Problem with recording device" my camera works but, my microphone doesn't it worked fine before. The thing I use is a really old camera I don't know if that has anything to do with it.

    Due to the age of the camera and lack of support from Creative your options are limited.  I would suggest you connect the device directly to a free USB port on your machine.  If you share it with several devices on a hub or extension the device can easily work intermittently.  That type of issue can cause the audio to fail to be initialized, creating the problem.  This can also occur if the audio half or both halves of the camera/cabling is intermittently failing as well.  You have the option of switching to the generic Microsoft Video and Audio drivers to see if that helps as well.    Below is a graphic on you how to update the drivers to the generic "USB Video Device".  You can do the exact same thing for the audio half of the camera by updating it to "USB Audio Device" (which is what you might want to try first in this scenario).  

  • Win 10 Problem with recording device

    i upgraded to windows 10 yesterday and i was skyping just fine now i go to call someone and it says problem with recording device its really annoying people call me just fine but cant hear me at all i hear them i checked my mic its fine complete response please help me

    Yeah no I'm having a very similar problem. Instead of me calling people or people calling me and my microphone not working. I can't even accept calls or make calls, it just drops the call and says "problem with recording device". But I tested my mic and camera and they are both working, so what's wrong? Why is this ruining my night?

  • A Problem With Recording: Delay Between Tra

    I recently purchased an Audigy 2 ZS Platinum Pro to replace my ailing Audigy 2 Platinum from a few years back. I've been trying to do some home recording (namely with Sony's Acid Pro 5.0) and I've been noticing some delay between tracks when I record.
    For example, I will record one track, and then record a second track, playing along to exactally what I hear. When the second track mixes down, there is an offset between the two tracks on the order of two or three tenths of a second. This offset produces a noticible doubling effect, and requires me to go in and move the audio track around so that it plays properly.
    I've tried other programs (Audacity and n-Tracks Studio) so I figure it's not something wrong with the program. My computer is new, it's running an Athlon 64 3400+, with over a gig of ram, so I can't imagine it's a problem with my computer.
    Anybody have any thoughts or experience with problems like this?

    bobweb wrote:
    I recently purchased an Audigy 2 ZS Platinum Pro to replace my ailing Audigy 2 Platinum from a few years back. I've been trying to do some home recording (namely with Sony's Acid Pro 5.0) and I've been noticing some delay between tracks when I record.
    For example, I will record one track, and then record a second track, playing along to exactally what I hear. When the second track mixes down, there is an offset between the two tracks on the order of two or three tenths of a second. This offset produces a noticible doubling effect, and requires me to go in and move the audio track around so that it plays properly.
    I've tried other programs (Audacity and n-Tracks Studio) so I figure it's not something wrong with the program. My computer is new, it's running an Athlon 64 3400+, with over a gig of ram, so I can't imagine it's a problem with my computer.
    Anybody have any thoughts or experience with problems like this?
    Latency issue.
    If you can select ASIO drivers (audio settings) on your software then use it and set latency on ASIO panel to ~ 5 ms.
    .jtp

  • Problems with record button on iPad rMini.

    Is anyone having problems activating the Record button in the Camera Video mode. It has a mind of its own. Sometimes I can get it to work, other times it won't activate unless I click out of camera mode and then go back and try again. Of course by then, I've lost the moment I wanted to record.
    Also I experience occasional problems in switching from video to camera or vice versa. Actually this usually occurs around the same time I am also experiencing problems with activating the Record button?
    Anybody know of a fix besides returning the device to the Apple store for another iPad rMini? Thanks.

    If its due to sensitivity issues, these self help guides might help.
    http://www.youtube.com/watch?v=zNwr_mxgs9Q
    http://www.youtube.com/watch?v=lSqPC1V0PPg&feature=related
    By the way, alcohol based hand sanitisers work too.
    Don't overapply it in one go though. You'll have to allow the alcohol to evaporate.
    One final tip, after its dried, I'd recommend you to leave your iPhone's home button facing a laptop's vent just to bake it a little drier.

  • Problems with recording BT sport

    trying to record the MLB on BTSP1
    was able to watch apart from 10 mins from the end of the game
    Got a message end of programe
    Happens on ESPN as well
    is this BTsport not telling the TV Guide that the game has been extended .
    or do I have to keep recording the following prorames to get the end of the baseball
    Can BT Sport sort  this out. does not happen when recording SKY sports programes like the NFL it get extened play

    Travelusa wrote:
    Thanks but does not help
    I have a SKY box I cannot change the end of programe
    It has to be done by BT Sport at your end to change the end of programe
    The link you gave me was for the BT Vision box
    Here's how to do it on a sky box that I found using Google http://help.sky.com/tv/problems-with-your-sky-tv/recordings-missing-the-start-or-end
    If you found this post helpful, please click on the star on the left
    If not, I'll try again

  • Problem with multiple counter plan containing running hrs and no of months

    Hey gurus,
    In my project the preventive maintenance of compressor is such that it is performed after 500 hrs or 6 months whichever comes first. Now i ve created a cycle set cosisting of 500 hrs and 6 months. In the multiple counter plan i ve assigned a counter to the plan for calculating 500 hrs and chosen the link as OR. I scheduled the plan and given the start date as 01.05.09. Now I am facing the following problem:
    Suppose my counter value reaches the 500 mark on 01.08.09. Now a maintenance order is generated. My client now wants that the next order should be generated after the counter reading reaches 1000 or the date reaches 01.02.10, ie, the order should be generated for next 500hrs or NEXT 6 MONTHS from
    the date of completion of first cycle, whichever comes first.
    Pls help....
    Regards,
    Abhishek

    Hi
    If u have scheduled ur plan according to cycle set. It will take the Point of contact as 6 months.
    OK
    Ex : Cycle set : 500 hrs and 6 months, maintained OR functions
    i have entered the measurement reading as 500.. thats why, it gives the call for todays date...
    see the next date will be after 6 months... If u update the measuring point only, it will open a order... otherwise.. once u have scheduled it for 6 months.. once in 6 months it will give a order...
    1     11.05.2009               0     New start  Save to call
    2     07.11.2009     07.11.2009          0     Scheduled  Hold
    3     06.05.2010     06.05.2010          0     Scheduled  Hold
    4     02.11.2010     02.11.2010          0     Scheduled  Hold
    5     01.05.2011     01.05.2011          0     Scheduled  Hold
    6     28.10.2011     28.10.2011          0     Scheduled  Hold
    7     25.04.2012     25.04.2012          0     Scheduled  Hold
    Schedule for a long period.. u will be able to understand the scenario...
    - Pithan

  • Problem in record counting?

    Hi,
      I want the total number of records displayed in the output of the report in an horizontal manner.
    Those values are obtained by giving range.
    for example:
      company codes                                      total
    0001|0002 |0003|                                       5
    0004|0005|
    It should count like this.
    I tried using sy-tabix,sy-dbcnt ,sy-index but i am not getting like the above.
        Please help me out with this.
                                                Thanks & Rgards,
                                                                 Mani.

    Hi Mani,
    You can use DESCRIBE LINES itab v_line.
    V_line will return the records of the internal table.

  • Problem with recording and sound on Pavilion ze1000 series

    I have an old Hp Pavilion ze 1250 running Windows XP (sp2) with 1gb  Ram. 
    I'm trying to convert some cassette tapes to digital (with Audacity). 
    My problem:  When I try to record using Audacity, it records about 10 seconds and then hangs.  When I click Stop and try to play the 10 seconds back, it freezes and won't play anything.  (After that, even if I import an mp3 file to work on, it won't play that either.)  It also causes all the sound to go off throughout the computer.  Songs will "play" in WMP but there's no sound in the speakers or headphones.  (The Microsoft logo music won't play either when I turn the computer off.)  I've tried resetting the volume and checking if anything is muted. Nothing . 
    I restart the computer and everything is fine.....sound works and Audacity plays.....until I try to record again.
     I thought that this was only an Audacity problem....until I tried to record 60 seconds through Sound Recorder.  The exact thing happens.  It records about 10 seconds of audio, then freezes and refuses to playback.  All the sound goes off throughout the computer and nothing solves it except Restart.
    My sound/audio device is Conexant AC-Link Audio. 
    The Sound Playback, Sound Recording, Voice Playback, and Voice Recording are all defaulted to HP VIA Audio.
    I have updated the audio driver.  Recording is enabled.  Is there something else I need to do?
    Thanks.

    Thank you for your reply. 
    I'll try some of those suggestions and see if that helps. 

  • Problem with syncing count of plays with itunes

    Hi everybody,
    Recently I lost my laptop (it has been stolen). Also i lost all data on harddrive including itunes libary. Thing is, all my music was on iPhone. Some of albums I bought in iTunes store, some of them imported from cd's. There was lots of stuff. When I bought another laptop, and connected my iPhone it says all data will be deleted from iPhone and replaced with data from itunes library. So I didn't want to do this, because i don't want to loose my count of plays, my playlists, etc, btw it would take ages to import all this music again, not mentioned about albums from itunes store!
    So i found this program - SHAREPOD - it helped me to copy all this data back to the computer, I copied that to iTunes Media folder and everything is in iTunes, so that's fine (apart from couple missing album artworks). But now, when I try to sync my iPhone with iTunes, it says the same message - all your data will be repleaced with itunes library. But I don't want it to repleace that, I just want to sync iPhone with that library. I really want to keep my count of plays for every song.
    Btw. the same problem is with programs, it wants to repleace that with itunes library, I've got more than 100 apps, most of them paid and i don't want to loose them, but I want it to work exactly the same as it worked previously.
    For me it's a really huge issue, that basically sync works only one way...
    Please help.

    You will have to sync and with any luck it won't try to re-sync all your music. In iTunes if you right click on your phone under the devices list you can select "transfer purchases" and that will move all your apps to iTunes.
    TuneUp companion is a great program that runs along side of iTunes that will fix all your track info and put the album artwork in the info.

  • Major problem with recording videos

    hello,i have nokia n95 8gb and i have searched the forum a bit and i didn't find solution the problem i have. When i'm recording video,after 5-7 seconds picture starts to get choppy and it does that like every 1 second for like 0,5 second,i also tried to record video with lower picture quality setting but result remains the same,anyway for the first 5-6 seconds picture is very fine and i can do whatever and the picture doesn't go choppy at any time so i would appreciate some help if anyone have had the same problem.

    08-Feb-2008 08:21 PM
    only_inder wrote:
    it could be a software glitch itself, please try to update the software of the phone.
    www.nokia.com/softwareupdate
    please take a backup of your phone to the pc or to the memory card, because softwareupdate gonna wipeout every single thing from the phone memory.
    br,
    I
    I have the same problem and I have the latest firmware. So updating won't help. The video-recording "hangs" for about 1 sec for every 2 sec recording. The end-result is NOT very good..

  • Problem with read count

    I am trying to receive 2500bytes via serial port and plot it on a chart, after sending character "S" to the sender device.
    I have set the "read count" to 2500 so it is supposed to receive 2500 byte then wait for another "S" but it just receives 101 bytes and then goes to next program iteration. how can i solve this problem?
    The VI have been attached.
    Attachments:
    2500.vi ‏21 KB

    First, you've posted to the wrong board. Your question has nothing to do with NI digital I/O devices.
    You seem to not understand how a VISA Read works. A read will terminate when the byte count is reached, or the timeout is reached, or the termination character is detected. Disable the termination character or set up multiple reads in order to get multi-line strings. For example, keep reading until the available bytes is zero. With a loop, shift register, and a concatenate string, this is easy to do.

Maybe you are looking for