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.

Similar Messages

  • Not able to make any call with my lumia 710

    Not able to make any call with my lumia 710 though other then call everything is working fine. I chacked my SIM in other phone, i there phone i can make calls. Whats wrong with my phone?

    hi
    i am using nokia lumia since last 6 months. i am having aitel connection. till few days back i was able to make phone calls however now phone calls are immediately getting ended.  i m able to send sms, receive calls and use intenel..problem presisits only with receiving call..
    suggest me a way out..plz..

  • I'm not able to access goolge docs with the blackberry browser (it worked fine till a few weeks ago)

    I'm not able to access google docs with the blackberry browser (it worked fine till a few weeks ago)
    seems that this issue happens to a lot of people
    is google going head to head with Blackberry ? or is this just a bug ? 
    Message Edited by avolcoff on 08-27-2009 01:06 AM

    Welcme to the cmmunity supprt frums
    Nurse-Berry
    Follow NurseBerry08 on Twitter

  • [HP Expert Day] "You are not able to restore this system with the media"

    Welcome to HP Experts day! 
    I've got a long-standing problem since last year. Let's see if you can solve this! 
     I'll get straight to the point : 
    I am unable to perform recovery on my system. This is the error message : 
    It's a USB recovery media created with the HP recovery media utility on the same laptop. Tested to work correctly before I sent it for RMA on my SSD. It initially was running on a micron SSD. When I got it back, it was a samsung SSD instead, according to some benchmark results. 
    Laptop : HP Envy Spectre XT 13-2018TU
    P.S I've already opened another thread on this last year. 
    http://h30434.www3.hp.com/t5/Notebook-Recovery/Unable-to-boot-from-USB-recovery-media/m-p/2197929#M1... 
    But they were stumped. 

    I had this exact same issue on a Spectre XT Pro Ultrabook. 
    The original SSD failed and I was sent a replacement, was fortunate enough to be able to create a Recovery USB stick using the wizard in Windows. When booting from USB I received the message "You are not able to restore this system with the media".
    SOLUTION: You must NOT use the Recovery USB stick in any USB3.0 port (labelled SS). Using another USB port prevented this exact error message from appearing and I was able to complete the system restore process.
    I hope this helps someone, I signed up and posted here especially for this reason!

  • Not able to import the article with sidecar.xml

    Hi,
    With the new DPS version (ver. 18), we are not able to import the article with sidecar.xml. Could you please check and suggest the solution for the same.
    With Regards,
    Anil Yadav

    I read that your sidecar needs the author-value to be working.
    —Johannes
    (mobil gesendet)
    Am 30.01.2012 07:54 schrieb "Anil Yadav" <[email protected]>:
       not able to import the article with sidecar.xml  created by Anil Yadav<http://forums.adobe.com/people/Anil+Yadav>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4173103#4173103>

  • Hi, i installed d latest version of itunes on my pc, but still am not able to connect my iPhone with that...

    hi, i installed the latest version of itune on my pc, but still i am not able to connect my iPhone with my pc....

    The top window says Accessing iTunes Store and the animation underneath will
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • I am Using Apple iPhone 4g 32gb and i have Updated to iOS 6.0 but in Maps i am not able to change the angle with two finger why so ?

    I am Using Apple iPhone 4g 32gb and i have Updated to iOS 6.0 but in Maps i am not able to change the angle with two finger why so ? I have also restored it but not getting

    I have an iPhone 4 also.  If you are referring to the flyover view, its unavailble for the iPhone4.  If you want to rotate the map, hold two fingers on the map for 2-3 seconds and rotate them in opposite directions.
    Hope this helps

  • HT1386 Since 8th May , I am not able to synchronize my iPhone with iTunes. Have tried removing previous back up data , removed all photos and videos on iPhone , switched  on and of and  reset iPhone  a million times , restarted my Mac a thousand times :(

    Since 8th May , after updating the iphone software to 5.1.1  I am not able to synchronize my iPhone with iTunes. Have tried removing previous back up datas , removed all photos and videos on iPhone , switched  on and of and  reset iPhone  a million times , restarted my Mac a thousand times Please Help !!!

    I have tried both options .. back up on this computer and also back up on icloud.
    The backingup is fine .. there is no problem .. even synchronizing songs , applications , calender , mail accounts is fine .. only the contacs are not synchronizing. The itune goes on and on .. showing synchronizing contacs .. but nothing happens. When i uncheck contacts synchronisation .. everything works fine . I have also reorganized my address book . but it does not help

  • Not able to open any doc with adobe reader XI. fatal error, acrobat failed to its core DLL load

    not able to open any doc with adobe reader XI. fatal error, acrobat failed to its core DLL load

    See http://helpx.adobe.com/acrobat/kb/reader-core-dll-error.html

  • HT1420 i am not able to authorised my mac with iPad

    i am not able to authorised my mac with ipad

    What happens when you try to authorise your account on your computer's iTunes ? You should be able to do so via the Store drop-down menu at the top of iTunes :
    If your iPad hasn't been synced to that computer before then you may also find this page for syncing to a new computer useful : https://discussions.apple.com/docs/DOC-3141

  • Not able to find Portal Combo with Stoplight in top right corner

    We are running on EP7.0 SP8. VC is also in SP8. After installing, I am not able to see PORTAL combo with the stoplight in the top right corner of VC. Any Help ?
    Regards,
    Murali

    Hi
    Actaully, in this version, I believe that we would not be getting the PORTAL url at top right corner. In my Quality server, it works fine.
    In my Development Server, when i click on 'Find Data' icon, it throws me the following error.
    0001> Welcome to Visual Composer
    0002> Portal Connector: fetch error: Bad or missing XML object
    0003> Parse of result error :Bad or missing XML object
    Any Help.
    Regards,
    Murali.

  • 2nd Try: Please Help : UIX : Not able to use messageFileUpload along with m

    UIX : Not able to use messageFileUpload along with messageChoice
    I used messageFileUpload UIX element and associated upload button to fileupload servlet. This servlet just captures the file and put it in desired location. This works just fine.
    My client wanted me to add another choice filed on UI. I used messageChoice. I named the field as fileType. All the options have name and value populated but when I submit the form servlet is reading fileType as NULL.
    I am not sure what's happening. Please let me know how should I send file handle as well fileType ?
    Thanks,
    Linda

    What exactly are you expecting this to do for you?
    Forall is designed to process batches of DML to prevent context switching from PL/SQL to SQL.
    Has no relevance for what you are trying to do.
    If you don't want to call the procedure multiple times, you need to rewrite it to passs the cursor to the function, then have the function process all the records.
    Carl

  • HT3541 I'm not able to complete my billing with my credit card is there any other options

    I'm not able to complete my billing with my credit card is there any other options

    See
    Why can’t I select None when I edit my Apple ID payment information?
    and
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    Step 3 is important, no matter whether you do this on a Mac or an iPad / iPhone:
    Important: Before proceeding to the next step, you must download and install a free application. ...
    Important: Before proceeding to the next step, you must download and install the free application by tapping Free followed by tapping Install App. …
    First you must download a free app from the App Store. When you are asked to sign in with your Apple ID, select "Create new account". Accept the terms and conditions checkbox, then click Continue. After you enter all the requested personal data, click Continue.
    When you are asked to select a payment method, select "None". 
    That's all there is to it.

  • Sorry last question got knocked back my ipad and iPhone on two different levels and I am not able to play through Facebook so not able to progress or unlock next level through Apple store. Don't know how to resolve problem

    Sorry last question got knocked back my ipad and iPhone on two different levels and I am not able to play through Facebook so not able to progress or unlock next level through Apple store. Don't know how to resolve problem

    Thank you again for all of your help!! I really appreciate it!
    I think I am following -- I was able to upload to my iPhoto and all photos and videos are there that is a plus! I tried to create an Event in my iPhoto and put all of my photos in that event but for some reason, now my iTunes it not recognizing that Event in my iPhoto. It is not allowing me to import just that event at the moment but I may be doing something wrong. At least all of my pics and vids are in iPhoto so that is a plus and I know they are at least saved somewhere. Just for some reason, my iTunes it not locating the event that I created with only those photos.
    Thank you for letting me know about my contacts! How do I know if I have the contacts app?
    Also, I had no clue that my iCloud could be backed up via cellular data! However, is this a new feature with the most updated iOS?? Unforutnatly I am like 2 iOS updates behind because I don't have enough storage on my phone. I still get the notification that my phone needs to be plugged in and connected to wifi in order to back up to the cloud :-(
    How can I sync using USB? Right now when i click on the info tab for my iPhone in my iTunes this is the answer that I get -- I am a little unclear as to what it means.
    Sync Contacts:
    Your contacts are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone
    Sync Calendars:
    Your calendars are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone

  • Not able to see published task and not able to reset version for the task

    Hi,
    Created a task ,validated,by selecting the task clicked Publish button in tools to publish the task.
    In Client Application(Callcenter) navigated Administration-Business Process->Task Deployment
    Here not able to see published task to activate.
    Tried twice by copying record but not able to see.
    I am not able to reset version for the task created.
    Could you please let me know how to overcome these.
    Using sample database of siebel8.0.0.5
    Thank you

    Hi Dude,
    To trobleshoot this you need to do the following steps:
    1) cross check in tools the srf which you are compling , the same srf should be used by the clent application i.e. call center
    2) the secound thing is in the Siebel tools there is a toolbar at the top, from where you have published the task, there beside you will find a button called Revise you can revise you task, first select task and click revise button.
    3) and also you remember a task which you create is validated by right clicking the task record and choose validate.
    4) remember, a task which you create should be registered same as like responsibilities, by navigating to Administration-Applicatrion > Task
    Register the task with same name as you have used in Siebel Tools.
    As, for best practices after creating a task first validate it, then after register it in Administration-Applicatrion > Task , then after toolbar there is a button callled publish and activate click that one .
    and that's All.
    Regards,
    Neeraj Verma

Maybe you are looking for