Query with "not in" no longer working

I created a query to show customers that had not been contacted (i.e.- did not have an activity) in B-one in the last 30 days so the salespeople could do follow up. they started using activities in January and now here in May-something is amiss.
Now after working for a while, it doesn't seem to be working.  It doesn't work for 30 days but does for 10 or 11 days specification.  There are a lot more activities now and i wonder if this is playing a part in it.  no chagnes or updates were made.
i ran the query in management studio and got the same failing results. here is the query:
SELECT T0.[CardCode], T0.[CardName], T0.[Phone1], T0.[CntctPrsn], T0.[E_Mail], T0.[SlpCode], T0.[CardType] FROM OCRD T0 WHERE  (T0.[Cardtype]<> 'S' ) and
(t0.[cardcode] not in (Select t3.[cardcode] from OCLG t3 where t3.[recontact] >= getdate() -30))
An example is i have customer A has activities dated 2/2/11, 2/18/11, 3/20/11, 4/5/11, and 4/6/11. doesn't matter if closed or open activity.
30 days from today would be 4/10/11 so customer A should show up in query list ....now NO customers at all show up. If I change the 30 in the GetDate line to 10 or 11, it does give me records.  But at 12, it doesn't.
Any thoughts- appreciatively,.
laura

Hi,
Try to break query first
run below query first
(Select t3.cardcode from OCLG t3 where t3.recontact >= getdate() -30)
Thanks
Kevin

Similar Messages

  • New software update has cleared my contacts and notes app no longer working

    Help!  I'm traveling and today when I turned on my phone getting off the plane, the s/w updated and all of my contacts are gone.  i use the HTC People app, not google contacts.   Also the Notes application no longer works, and comes up with an error to force close.    Any ideas on reversing the s/w upgrade or getting my contacts back?  Thank you.

    If you were using Verizon's backup assitant you should be able to hit Menu | Settings | Accounts & Sync | add account and select backup assitant and it should prompt you for your pin number and restore your contacts. If you were not your only option for restore would be if you had backup software installed, or if you sync'ed using HTC Sync to outlook or some other program...I wish you the best of luck.

  • Not able to migrate a query with not exist clause

    Hi all,
    I'm using Toplink 10.1.3 and I am trying to rewrite the following query with Expression Framework:
    select distinct r.e_ogg_oper_k_oggetto
    FROM regola_accettazione_oper_banc r, oggetto_operazione_bancaria o
    where not exists (
    select 1
    FROM limitaz_ogg_tipo_oper_banc l
    where nvl(l.d_fine_validita,trunc(sysdate)+1)>trunc(sysdate)
    and l.d_inizio_validita <= trunc(sysdate)
    and l.e_tpodv_k_tipo_operazione=:appoggio.tipo_operaz
    and l.e_ogg_oper_k_oggetto=r.e_ogg_oper_k_oggetto
    and l.e_uni_oper_k_unita_oper_util= :appoggio.e_uni_oper_k_unita_oper_esegui )
    and r.e_oper_ban_k_operaz_bancaria=:appoggio.form
    and r.e_ogg_oper_k_oggetto=o.k_oggetto
    and o.e_ogg_oper_k_oggetto is null
    and o.k_oggetto != nvl(:appoggio.oggetto_autom,,'0')
    and o.k_oggetto like substr(:appoggio.oggetto,1,2)||'%'
    and r.d_inizio_validita <= :appoggio.d_contab
    and to_date(nvl(to_char(r.d_fine_validita,DD/MM/YYYY'),31/12/3999'),'DD/MM/YYYY')> :appoggio.d_contab
    and o.f_natura_oggetto in ('G','P') and r.f_oggetto_automatizzato!='S'
    I'm not able to "attach" the not exist clause to the rest of query.
    How can I do it?
    Thank you very much.

    Not exists can be used in an expression through using a ReportQuery sub-query.
    i.e.
    ExpressionBuilder outerBuilder = new ExpressionBuilder();
    ReadAllQuery outerQuery = new ReadAllQuery(Employee.class, outerBuilder);
    ExpressionBuilder subBuilder = new ExpressionBuilder();
    ReportQuery subQuery = new ReportQuery(Address.class, subBuilder);
    subQuery.addAttribute("id");
    subQuery.setSelectionCriteria(
    subBuilder.get("city").equal(outerBuilder.get("address").get("city")
    .and(subBuilder.notEqual(outerBuilder.get("address")))));
    outerQuery.setSelectionCriteria(
    outerBuilder.notExists(subQuery));
    List results = (List) session.executeQuery(outerQuery);
    Refer to the documentation section on sub-queries for more information.
    I would suggest simlpifying the where clause until you get the sub-query working to start.
    You can also always use a custom SQL query in TopLink.

  • Notes sync no longer works

    I've just upgraded to OS X 10.8 Mountain Lion on my early 2009 iMac and since the upgrade Apple's Notes app no longer syncs with Notes on my iPhone 3G or my new iPad 3rd generation when syncing via USB cable.
    The Mail and Notes apps have now been split - but Notes does not appear anywhere in the syncing options in iTunes (in the Info tab).
    I spent an hour on the phone with an Apple support guy (2nd level), who eventually admitted there was no solution.
    Anyone found a workaround?
    Apple - please fix this!

    Rubbish indeed. You used to be able to hit a back button and select which email address on your phone you were looking at notes from. They totally did some kind of "update" or something to get rid of that feature. Not cool. Either they hate Google too a little bit too much or they really want to force us to use iCloud, buy a new phone and stop using their still useful 4 year old iPhone 3G. I used the note sync feature with Gmail all the time. it was totally rad.

  • Upgraded reports with left join no longer working in Visual Studio 2008

    I've upgraded an ASP.NET project, which has lots of reports, from Visual Studio 2003 to Visual Studio 2008. Any reports that  contain a left outer join relationship no longer work and it's driving me mad as I've spent hours on this now. Basically, the join fails because there's no rows on the right side of the relationship. I'm checking for nulls in the formula's and there's no record selection criteria. The report is pulling data from 2 stored procedures and a couple of tables. Any ideas?

    Hi Ludek,
    Thanks for your reply. I've already applied SP1 and I assumed it worked, but looking at it in depth I'm not so sure. The installer runs and says its configuring windows etc and it l looks like it finishes, but it doesn't display a message to say installation was successful. When I look in the event log there are warnings during the install, I don't know if I should be worried about them. They are as follows:
    Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetEntityDataModelVB_ASPNET.zip), file (ModelObjectItemVB_ASPNET.vstemplate). Invalid template element (TemplateID) value (Microsoft.Data.Entity.Design.VSTemplate.ModelObjectItemVB_ASPNET)
    Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetDataServiceVBWebsite.zip), file (WebDataService.vstemplate).  Unknown attribute (_locID).
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    As for the report itself, Its connecting to SQL Server and getting the data from 2 stored procedures and a few tables. There are no errors reported in the report, the only warning we have is when you close the database expert it says:
    "More than one datasource or a stored procedure has has been used in this report. Please make sure that no SQL expression is added and no server-side group-by is performed." We've always had that message and it's never caused any problems before.

  • IOS 8.2: Notes.app no longer works with Gmail hosted Notes

    I'm on iOS 8.2, but I haven't tested this for a while so I don't know if it's a new problem.
    BACKGROUND:
    In Settings:Mail, Contacts, Calendars:Accounts you can setup a Gmail account. If you do that you have options to use
    Mail
    Contacts
    Calendars
    Notes
    I use Mail, but in iOS 7 I used to also use Gmail (Google) hosted Notes. The Notes.app would then show a "heading" of Gmail and I could create or view those "notes" (IMAP store).
    PROBLEM
    In 8.2 when I turn Gmail "Notes" on nothing happens in Notes.app. There's no heading for Gmail notes. It simply doesn't work.
    Could someone else test this and let me know if it works for them? If it works for anyone else I'll do more debugging.

    The things that I have tried:
    - Remove exchange account, restart phone, create new exchange account, restart again, open app. Nothing.
    - Created a Gmail account instead of an exchange account (which didn't work previously, due to me not seeing the shared calendar), didn't work.

  • Adapter that used to work with Gen 1 no longer works with Gen 6 nano

    Hi
    Here's my problem
    I had nano gen 1 2Gb I had no use for (a gift) and now I I restore radios I git to use it to trasmit music via adapter I have bought 2 weeks ago, which plugs into the Apple interface slot and outputs USB and L/R audio.
    This one.
    http://www.ebay.com/itm/New-USB-Cable-Video-AV-TV-RCA-for-iPod-Mini-Touch-Nano-V ideo-Classic-/350684814012?pt=US_MP3_Player_Cables_Adapters&hash=item51a6719abc
    It worked just fine with Gen 1.
    Then someone alerted me to that recall program and it got exchanged for Gen 6 a week ago.
    When I plugged the adapter in it displayed "unrecognized device" but as I was playing FM radio it worked.
    Then I used iTunes (latest) to convert some CDs, downloaded them into the iPod, started playing.....it playes for a few second, then makes the "wrong answer" sound (you know, that "errrrrrrrrrr!") and then keeps playing, and this happens every few seconds.
    I thought first my disk import went bad as my computer is old and slow.
    So I first played the imported disks on my computer, which worked fine, and then I played the iPod with just phones, expecting to hear that "errrrrrrrrrrr!" - nope, playes fine.
    Then I plugged in the adapter (I only plugged it into iPod, the other end stayed unplugged) - and there it came again.
    So, somehow the adapter that worked finr with gen 1 is no longer good.
    Had I known that I would never exchanged it - 2GB is plenty of space, and the chance of that battery going up in flames are small.
    Any ideas, anyone?
    Regards,
    Mike.

    Not sure but maybe something to do with casting. Below is the code snippet from one of the blogs. Try modifying your script like below and see if still you get the error
    [Microsoft.SharePoint.SPFieldUserValueCollection]$lotsofpeople = New-Object Microsoft.SharePoint.SPFieldUserValueCollection
    $user1 = $w.EnsureUser("domain\user1");
    $user1Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user1.Id, $user1.LoginName)
    $user2 = $w.EnsureUser("domain\user2");
    $user2Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user2.Id, $user2.LoginName);
    $lotsofpeople.Add($user1Value);
    $lotsofpeople.Add($user2Value);
    $i["lotsofpeoplefield"] = $lotsofpeople;
    $i.Update();
    #-or-
    $l.Fields["lotsofpeoplefield"].ParseAndSetValue($i,$lotsofpeople);
    $i.Update();
    Reference to the link
    http://social.technet.microsoft.com/wiki/contents/articles/20831.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-powershell.aspx
    Geetanjali Arora | My blogs |

  • RE: Library Sharing with Apple TV1, no longer works with Home Sharing on.

    Let me begin by telling you what I have.
    Last year I took my old 2006 XServe Dual Quad 2.8 GHz and moved it in my home which is hardwired, and set it to share my iTunes library (700 movies, 700 TV Shows and 16,000 songs) to my six Macs, 3 PC's and four Rev. 1 Apple TV's, thereby creating a cheap Kaleidescape Video Server System (www. Kaleidescape.com), and it worked great. However, when I introduced an Rev. 2 Apple TV into the equation, it, the Apple TV2 does not see the shared libraries on the XServe. It requires Home Sharing. The problem begins when I turn on Home Sharing for the Apple TV2, my Apple TV1's no longer see the Shared Libraries, and I have not be able to find a solution that allows me to run both TV's. In looking through the internet it appears the Traditional Sharing that I was used to, is going away with IOS. The question then becomes, is there a work around? Realistically, I cannot see why Apple would disable this feature as it works so well, and didn't require iTunes Authorization, which is user limited. Any ideas? I would really appreciate the help.

    Hi there catcherlojo,
    It sounds like you have already tried a few things, but you may still find the troubleshooting steps in the article below helpful.
    Troubleshooting Home Sharing
    http://support.apple.com/kb/TS2972
    -Griff W. 

  • Moving windows/applications around with 3 fingers no longer working??

    Hey y'all,
    I hope someone will be able to lead me to the right direction to help fix my issue:
    I used to be able to use 3 fingers to move windows and applications around my screen, but not anymore on my brand new MBP with force touch.
    Does anyone know if they discontinued this feature on the new MacBooks or what?
    Thanks,
    -Alex

    Mr A Man2,
    The trackpad preferences are a little different on my machine and no longer include the "Three Finger Drag" that I've grown accustomed to using.
    I'm sure there has to be a different way to enable it on my machine, but I just can't quite figure it out.
    I will post a picture of my trackpad system preferences once I get home from work today.
    Thanks again for your time and for all your help,
    -Alex

  • Ringtones (stock, NOT custom) no longer work.

    Ok, I searched around, and all i found was hundreds of custom ringtone threads...which dont pertain to this problem. (and I think we need just a few more rebate discussions, there are only about 20 per page).
    Anyway, I ran the first update last week or so (not the second that knocked out the custom ringtone workaround). Anyway since then, I have noticed that my contacts are not ringing with their custom tones. I get the phone-wide generic ringer instead. The weird thing is, not ALL the contacts do this. Some give me the tone I set for them, and some use the standard (one for all non contact incoming calls). Anyway, I just went to check my ringer settings, and now my tones wont play (preview) at all. And yes, the ringer is on, and volume is up (just got a call and all was fine).
    Anyone else having any similar issues?

    Glad that worked for you.  I thought it was the problem because I  had several entries that were grouped too.  I tried deleting the duplicate entries, the whole entry actually, and re-creating it.  Still no luck. I'm having the problem with both ringtones and text tones. I could get it to work in the original release of iOS5 by re-assigning them, but with the 5.1 update, they work only sporadically (which I know makes no sense at all).  Also, in iOS5, in Contacts, the custom tone was reset to default.  In 5.1, the custom tones I've chosen are listed with the contact, but it still plays the default tone.

  • Opening pdfs with acrobat 8 no longer working

    Has anyone else experienced this new issue with launching
    Acrobat 8 on Windows machines from a Director-made program? I've
    been using this BuddyApi script for years without incident. Now my
    clients who've upgraded (sometimes unknowingly) to Acrobat 8
    recently, cannot see the pdfs anymore. Acrobat simply does not open
    (launch). There are no errors. Acrobat 8 on the Mac side does
    continue to work properly however. This has the potential to be a
    huge issue with my past and future programming. Has anyone come
    across a fix or new script yet? I checked Acrobat FAQs and BuddyApi
    FAQs as well as Google searches but to no avail. Any help is
    appreciated.
    -M
    (see script code below)

    --------------4664B2E88D6DAA384C7E1BC4
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Applied CD wrote:
    > Yes, I've seen it and so have a few others but I don?t
    have a solution yet.
    > Take a look at this thread:
    >
    >
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=187&threadid=
    > 1278152
    >
    > My tone was a little rough to start off with, we were
    having a bad day here ;-)
    OK, just looked at the above thread. So, does appear to be an
    Arobat issue. Though
    not sure why it happens on some computers and not on others.
    Are there any big
    differences between the working computers and non working
    ones - maybe CPU. I have
    just emailed Gary Smith, the developer of Buddy API to ask if
    he's heard of the
    issue and if he can offer any suggestions. I'll post back
    here with what response I
    get.
    regards
    Dean
    Director Lecturer / Consultant / Director Enthusiast
    http://www.fbe.unsw.edu.au/learning/director
    http://www.multimediacreative.com.au
    email: [email protected]
    --------------4664B2E88D6DAA384C7E1BC4
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    <!doctype html public "-//w3c//dtd html 4.0
    transitional//en">
    <html>
    Applied CD wrote:
    <blockquote TYPE=CITE>Yes, I've seen it and so have a
    few others but I
    don?t have a solution yet.
    <br>Take a look at this thread:
    <p><a href="
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=187&threadid=">http://w ww.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=187&amp;threadid=</a>
    <br>1278152
    <p> My tone was a little rough to start off
    with, we were having a
    bad day here ;-)</blockquote>
    OK, just looked at the above thread. So, does appear to be an
    Arobat issue.
    Though not sure why it happens on some computers and not on
    others. Are
    there any big differences between the working computers and
    non working
    ones - maybe CPU. I have just emailed Gary Smith, the
    developer of Buddy
    API to ask if he's heard of the issue and if he can offer any
    suggestions.
    I'll post back here with what response I get.<br>
    <br>
    regards
    <br>Dean
    <p>Director Lecturer / Consultant / Director Enthusiast
    <br><A HREF="
    http://www.fbe.unsw.edu.au/learning/director">http://www.fbe.unsw.edu.au/learning/director </A>
    <br><A HREF="
    http://www.multimediacreative.com.au">http://www.multimediacreative.com.au</A>
    <br>email: [email protected]
    <br> </html>
    --------------4664B2E88D6DAA384C7E1BC4--

  • IMac mid 2010 w OSX 10.9.5: headphone with mic -- mic no longer working

    I've been using the same headset plus mic with my iMac for a couple of years. Has worked fine until yesterday. Now the mic does not work. Headset / mic still work fine with my phone and other computers so nothing wrong with the headset. Checked system preferences -> sound -> input and the headset shows up but the blue bars don't move when I talk into the mic. I rebooted the machine and still have the same problem.
    Any ideas? Thanks.
    Jim

    I tried resetting the SMC and PRAM. No luck unfortunately.
    I've tried two headsets and neither are working (both worked fine two days ago). I've used both headsets on other devices and they are working fine there.
    I can hear through the headset but cannot be heard when I talk.
    Thanks.
    Jim

  • Query with not like

    Hi,
    I am strugling with a query to display only Production Order in which there is lack of item '05.%'...
    Is there a way to achieve only such Production Orders list ?
    Any help would be appreciated.
    Thank you,
    Tomasz

    ok, maybe I'll give the example as I don't know the solution:
    SELECT T0.[DocNum], T0.[ItemCode], T0.[Status], T0.[Type], T0.[PlannedQty], T1.[ItemCode]
    FROM OWOR T0  INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE T1.[ItemCode] not like '05.%'
    as result I see Production Orders, when I enter some of these documents I see they have '05.%' item in line, the question is how to list only the documents without '05.%' item.
    Thank you,
    Tomasz

  • Adobe PDF converter printer driver not installed: No longer working.

    I recently uninstalled and reinstalled my Epson printer and now my PDF converter isn't working. 
    I'm using Win XP and Adobe CS3 Design Standard. I tried several of the suggestions here on the forums on reinstalling PDF converter driver and or switching ports, but to no avail.

    Problem Solved !!!
    Printer Name: Adobe PDF
    Port: Adobe PDF Local Port
    Advanced: Driver: Adobe PDF Converter
       Spool Print  and Start printing Immediately (Uncheck Send to Printer)
    Once I got the above in place I was then finally able to install as noted below:
    Try adding it manually: These instructions are for Windows 7 but I don't
    think Vista's install varied much, if at all.
    1) Open the Devices and Printers dialog box and select Add a Printer
    2) Add a* Local Printer* at the next dialog box asking what type of printer
    you want to install.
    3. Select* Create  A New Port* at the Choose Printer Port and select* Local
    Port at* the type of port dropdown menu.
    4. Click Next, then at the prompt name the Port "Adobe PDF" or whatever you
    prefer.
    5. Click OK and at the Install Printer Driver dialogue box, click Have
    Disk and browse to *C:\Program Files\Adobe\Acrobat
    10.0\Acrobat\Xtras\AdobePDF* folder and highlight the AdobePDF.inf file.
    Click Open, then OK.
    6.  When presented with a list of Adobe PDF Converter options, select the
    first item from the list and click Next.
    7. Make sure the radio button is selected for Use the driver that is
    currently installed (Recommended) Click Next.
    8. The printer name dialogue box should default to Adobe PDF Converter, if
    not change it to that exact name.
    9. Then click Next through remaining screens to install.
    At this point, the printer should be installed.  Hopefully this helps.

  • Revive old itunes account with email that no longer works??

    i have an old account under [email protected]
    Apple says it has been disabled, when i try to set new password i can not because that email has been dead form years.
    a few years ago i started a new account with a different email address but i want all my old music back.
    i just imported all my old music from a ten year old windows XP machine to my new windows 8 machine, now itunes wants me to enter the password for [email protected] to allow these old songs on my new itunes account

    You need to contact Apple. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (90544)

Maybe you are looking for

  • How to install Canon LIDE60 scanner plugin & scan direct in PhotoShop CS4?

    I just installed CS4 PhotoShop on my MBPro and can't remember how to install Canon driver for my Canon LIDE60 scanner so that I can scan directly from the PhotoSHop IMPORT menu? Can anyone please help? Thanks

  • When composing a new message in mail on OS X 10.9.2, is there a way to change the "sending" account on a per-message basis?

    I just got a new MacBook Pro and when composing a new message, I can no longer choose which e-mail account I want to use for the new message.  It also does not show which account I'm using in the e-mail composition panel.  Is there a way to fix this?

  • Trackpad not working correctly.

    My mac seems to have been taken over. The trackpad is not working properly and is opening up everything on the desktop. I've connected a wireless mouse via bluetooth and it does the same thing. It's almost as if it's possessed. Please help!

  • Homepage Photo Gallery preview

    Hi, I am trying to find out what the proper term(s) is to describe a Flash homepage, photo gallery preview...such as the one shown on the following website: http://spotted.shelbycountyreporter.com/. Does anyone know where I can download a template of

  • Mac mini vs. Muse receptor

    I am running Logic Pro 8 on imac with lots of plugins (Arturia and Korg softsynths, East West Ministry of Rock, Omnisphere, RMX, etc.) and would like to save cpu power. Any feedback on using a Mac mini to run my plugins vs. a Muse receptor?