-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ORA-00907: missing right parenthesis when using exists subq.
PostPosted: Thu Jan 12, 2017 9:55 am 
Newbie

Joined: Mon Sep 24, 2007 2:55 pm
Posts: 13
My application is deployed to Wildfly 10.1. server including Hibernate 5.0.10.
Using the Criteria API this statement is sent to the database:
Code:
select
    distinct ...
from
    mbi_festa mbifesta0_
inner join
    mbi_feber mbifeber1_
        on mbifesta0_.bereich_nr=mbifeber1_.bereich_nr
inner join
    mbi_fekvw mbifekvw2_
        on mbifesta0_.festa_serial=mbifekvw2_.festa_serial
where
    (
        mbifeber1_.bereich_nr in (
            801 , 912
        )
    )
    and (
        mbifesta0_.status between 1 and 8
    )
    and mbifekvw2_.verw_tabelle=1
    and mbifekvw2_.aufloes_knz='1'
    and (
        exists (
            select
                (mbiaflap3_.lade_nr,
                mbiaflap3_.ladepos_nr)
            from
                mbi_aflap mbiaflap3_
            where
                mbiaflap3_.afsta_serial=mbifekvw2_.stamm_serial
                and mbiaflap3_.pos_nr=mbifekvw2_.af_pos_nr
                and mbiaflap3_.lade_nr>=19260
                and mbiaflap3_.lade_nr<=19260
        )
    )

Oracle 11 database gives us an errror: ORA-00907: missing right parenthesis. Oracle does not like the left parenthesis "and" and "exists".
Is there any option / property that can be used to reduce the number of parenthesis used?
Some and conditions are inside parenthesis (e.g. "mbifesta0_.status between 1 and 8") others not (e.g. "mbifekvw2_.verw_tabelle=1").


Top
 Profile  
 
 Post subject: Re: ORA-00907: missing right parenthesis when using exists subq.
PostPosted: Mon Jan 16, 2017 3:35 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
You could open a JIRA issue. I guess the parenthesis were added to overcome some other issue. It requires some investigation, nevertheless.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.