How do you run a query to view duplicate records?

I need to run a query with the query generator to produce a list of matching records. We have a problem whereby sales orders can come in by phone and email and therefore they sometimes get put on the system twice. I need to produce a query which picks up any orders where the CardCode and Document Value match, within say two days of each other.
Please help?

Hi Wendy Burt....
Try This
SELECT   COUNT(T0.[CardCode])as Duplicatecount, T0.[CardName], T0.[DocTotal] FROM ORDR T0
WHERE T0.[DocTotal] IN ( select t1.doctotal from ORDR t1
where t0.cardcode=t1.CardCode AND datediff(dd, t0.docdate,getdate())<=2)
AND
T0.CARDCODE IN ( select t1.CardCode from ORDR t1
where t0.cardcode=t1.CardCode AND datediff(dd, t0.docdate,getdate())<=2)
and t0.docstatus = 'O' and t0.doctotal >0
GROUP BY  T0.[CardName], T0.[DocTotal]
Regards,
Kennedy

Similar Messages

  • How do you run Adobe Reader with New Lions

    How do you run Adobe Reader with New Lions?

    Lion has Preview, you may not need Adobe Reader.
    Preview Help
    View your images and PDF documents, touch them up, annotate them, and share your comments.
    Regards,
    Colin R.

  • How Do You Spell Check in LIVE view using Fluid Grid

    How Do You Spell Check in LIVE view using Fluid Grid???
    When using LIVE view in Fluid grid... Spell Check is only available in Code view... which doesn't seem to work.
    huh... it doesn't end!

    At the moment, you don't.  The Adobe team is aware of it.
    Provide "Design View" for Fluid Grid Webpages
    Nancy O.

  • Is it possible to run host command from SAP environment? How do you run?

    Hi
    Is it possible to run host command from SAP environment? How do you run?
    Thank You

    Hello Subhash
    You will more details in the following thread:
    Re: How to define command for SXPG_COMMAND_EXECUTE
    Regards
      Uwe

  • How do you switch to a vertical view?

    how do you switch to a vertical view in Adobe Digital Editions 3.0

    i tried that unsuccessfully.  when I added the 2nd email address i got a popup that says "Unable to verify email because it is already in use."  Thats the one I would like to switch to.  So.... i would like to delete the current apple ID and replace it with the Apple ID that is "already in use".

  • HT4515 How do you change the setting to view the iPhone 5 horizontally.  It is locked in the vertical position

    How do you change the setting to view the iPhone Horizontally?  It is locked in the vertical setting.  Thanks

    Orientation lock is covered in the manual.
    Click Support at the top of this page, then click Manuals

  • How do you run apps on creative cloud? I can't seem to run them or see them on my desktop

    How do you run apps on creative cloud? I can't seem to run them or see them on my desktop

    Hi JasonLuong,
    You will have to go to www.creative.adobe.com and login with your Adobe Id on which you have purchased the subscription.
    You can go to the download center and then start downloading all the cc apps available. It will first download and install the Creative cloud desktop tool in your computer. This creative cloud desktop will show you the option to download all the CC programs, the updates, etc.
    Thanks
    Kapil Rupani

  • How do you delete programs from recently viewed

    while in netflix programming, how do you delete from the recently viewed?

    You don't, it's a selection of your most recently watched, old ones disppear to allow for new titles though.

  • How do you run a Wagetype G/L report in SAP

    Hi SAP experts
    In SAP system,How do you run a Wagetype G/L report?
    regards
    Krishna

    Aarti
    Thanks for your answers,this was the report I was  looking for .
    Full points awarded to you .we can also use this transaction code directly
    PC00_M99_DKON
    regards
    krishna

  • How do you run a full virus scan

    How do you run a full virus scan on the Imac

    Take a look at this article:
    http://en.wikipedia.org/wiki/Phishing
    Running a virus scan would not help at all - someone got your email address and is now hoping you're dumb enough to use the links they provided and give them information so they can use your credit card or checking acount number, password, etc.
    I would change my user name and password immediately (if not sooner!!) - make it difficult to guess. Do it at least with the bank involved; however, to be safe, it wouldn't hurt doing it with others as well.

  • How do you make a Spry menu view on all pages but only have to change it one place?

    How do you make a Spry menu view on all pages but only have to change it one place? Someone told me maybe I could create a Library item. Any help will be appreciated.

    If your pages all have the same basic design, using a DW Template would be a way to do it...
    http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7abea.h tml

  • HT5246 How do you run the Flashback malware removal tool?

    How do you run the Flashback malware removal tool?
    Thanks

    I am away from my computer and it is somewhat awkward to reply on an iPad.
    > I had already done what softwater instructed. I've read that it deletes itself on other threads, but it's still in my Finder as a Device. That's what confused me, because it doesn't appear to have deleted itself.
    Sorry, I wasn't clear. That is not the tool. It is the .dmg image mounted to your desktop. Next to the name you will see a small eject icon. Click on it or highlight it and choose "Eject" from the appropriate Finder menu. Once that happens you can drag the .dmg file to the trash as it will not delete itself.
    > I only recently upgraded to Snow Leopard and then Lion, in quick succession. My understanding is that there were (are) variants that would have infected my computer prior to my upgrading my OS to Lion. Before the upgrade, they were Adobe, but afterward they were Java. Could it be that be that the pop-ups were/are some other variant?
    Difficult to say for certain. Apple says it deletes all the common variants but does not specify which and I haven't seen the results of any testing done to verify that it finds and deletes those. The only dialogs that appeared with the initial variants were for FlashPlayer. They are depicted in the descriptions for Flashback-A on F-Secures site if you want to take a look. There have been none that I am aware of for Java, so that is probably either a web page or application that needs Java to run giving you that alert.
    > If the Flashback malware removal tool didn't find anything and my Software Update is current, does that mean the vulnerability has been fixed? At least for now? I understand that I Software Update will prompt downloads in the future if and when it needs to be patched again.
    The vulnerability is in Java, nowhere else, so if you don't have it installed there was nothing to fix.
    If you download Java in the future it will be the latest version Apple has available at the time, which hopefully will not be subject to exploitation, yet...

  • How to create an activity when system finds duplicate record!!

    Hi CRM Experts,
    I am working on CRM 5.0. We are uploading contact details to CRM through ELM.
    Here My queries are:
    1) How to create An Activity when system finds duplicate record?
    2) By using ELM we can create BP with Activities and BP with Leads. But Here, my scenario is we have to Create BP with leads and Acivities. can any one help me on these areas?
    Thank in Advance.
    Sree

    Hi Sree,
    I can help you with your first query.
    When the system finds a duplicate record then either the system stops working further or proceeds with the error free record.
    So once the duplicate entry is found only the first record will be considered and not the second or the duplicate record.
    Regards,
    Rekha Dadwal
    Kindly reward with points if usefull !!!!

  • How do you run to Drives on the same screen. I installed a ssd and a hhd to my mac but i can only view the content of the drive only if i boot of that drive. Im try to have my ssd for fast boots and hhd for my music,movies etc. Please help.

    I installed a samsung 840 pro SSD to my primary slot and relocated my 1.5 TB HDD to a data double where my optical drive was. I transfered my apps and Mac OS X to my SSD for fast boots and all my itunes movies, music, Iphoto etc to my HDD. I rebooted off my SSD then seen all the data on my HHD itunes movies, music, iphotos etc i cannot view on my SSD. So my question is how do you view all the content on both the ssd and hdd on the same screen with having to boot off one or the other?

    No, what I'm saying is that once you boot into OSX, you should be able to see both drives listed.  If you don't then either OSX is hiding the other drive because it sees it as a boot drive and is trying to protect the contents from novice users or there's another problem.  If it's the first thing (i.e. it's a protection thing), then your only option would be to boot into the old drive, copy off all your personal data to an external backup drive, then reboot into the SSD and go into Disk Utilities and wipe/reformat the second drive so that you can see it as a regular secondary drive.  Then when you see it as that, you can copy your data back to it.
    Be carefull poking around in Disk Utility as you can easily lose your data.  It's possible the Mac just isn't mounting that second drive because it sees it as another boot drive.  Whatever you do, don't accidentally erase it without getting a copy of your data off of it because you obviously don't have that on your SSD now.

  • How do you sum columns in same view

    I have a search component (drag and drop the viewCriteria) with a table.
    In the table is a column for an amount (number). I need to sum the amount and put it in the footer.
    I have done this many times with master/detail. Lots of info on that on the web as well. Really simple.
    In the view:
    So I create a transient attribute (sumAmount).
    I set the value to Expression and use one of the following (and several others that are not here).
    On the screen:
    drag SumAmount from the DC onto the footer. (OutputText no label)
    OK so far!?
    Run and query - (wishful thinking)
    Change the query and new totals appear (not that far yet).
    I have tried several permutations.
    adf.object.sum("Amount")
    sum("Amount")
    adf.object.ViewVO.getrowset.sum("Amount")
    All show absolutely nothing - I have the output text defined in the footer and the footer is displaying fine.
    The table also has some dates in the criteria - when I generate the rowImpl - the search panel is rendered useless due to the Date Domain vs Sql Date ( I know how to manage this)
    This has to be simple - just need to get a bit of help on it.
    I have tried to do this similar to the master/detail (but in this case - no detail). Still no value.
    I should be able to create a "formula" column without the use of java rowImpl.

    Finally - I have all the pieces - they are (were) as follows.
    1) create the View Object.
    2) add the summary column (transient) (be sure to get the data type correct (Number or BigDecimal)).
    3) create the view object implementation. (the Java tab in the view object - first box)
    4) create the view row implementation and expose the accessors. (the Java tab in the view object - second box).
    5) use Steve Muench's help to do the summation - it is a bit tricky and it has a depreciated call in it - but it works. (it is easy to modify to fit - just get the right attribute name for the sum & data type - I used Big Decimal)
    http://otn.oracle.com/products/jdev/tips/muench/recalctotalvo/RecalcTotalOfRowsInVO.zip (may have to look for the proper link - I found a lot of broken references)
    6) add a footer to the table in the search page and drag and output text box into it (all one step with drag and drop) - leave it empty.
    7) in the bindings page of the screen - add an attribute binding for the summary column from the Application Module.
    8) once the binding is made, go back to the output text box and use the inspector to create an expression and bind the value to "adf bindings" - data - and select the view-backing definition from the binding you just created.
    9) if you want to format this to right justified - surround with JSF HTML "panel grid - 1 column width=100% and style= text:align right - I usually do bold as well.
    10) sit back, relax and run - it should work.

Maybe you are looking for

  • How to link text frames in Pages 5.2?

    How to link text frames in Pages 5.2?

  • Transfer phone numbers from iphone 3gs to iphone 4s?

    How can I transfer phone numbers from iphone 3gs to iphone 4s?

  • Kernel patch update for solaris 10 x86

    I have Solaris 10 06/06 installed on x86 machine which is using svm and clustered with another node. The kernel revision is 118855-19 from the uname -a output. I am looking for the kernel patch updation and I heard 118855-36 is the latest one. Shall

  • Mozilla Thunderbird crashes

    Anybody having trouble with Mozilla Thunderbird?  All of a sudden my program crashes every time I try to open it.  Input would be greatly appreciated. Thanks to all!~ " .. Good Art Won't (Necessarily) Match Your Sofa .." [X61 Think Pad Tablet Model 7

  • Re: Ghost laptop does not have enough max memory

    Hi Daniel, That's the same impression I have. The MSI GT80 Titan that my company purchased was the first MSI product and we were surprised by this situation. Many years ago, we started building our own desktops out of necessity in order to get t...