Skip to main content
Question

Exists in WHERE condition


haritha.waidyaratne
Sidekick
Forum|alt.badge.img+5

Hi all,

Do you have an idea why Exists() doesn’t work here? It seems to only work in an IF condition.
 

Kind regards,

5 replies

Buddhika Kurera
Superhero (Employee)
Forum|alt.badge.img+15

@haritha.waidyaratne What is the result produced by the method call?

I suspect it might trigger a "Too Many Rows" exception rather than returning a value of True or False. Please check !


haritha.waidyaratne
Sidekick
Forum|alt.badge.img+5

Hi Buddhika,

Sure will check it in detail and get back to you.

Thanks many for the suggestion.

Kind regards,
Haritha


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 853 replies
  • March 21, 2024

Hi @haritha.waidyaratne 

Oracle doesn’t have the support for BOOLEAN in comparison rules. Exists returns a Boolean and therefore you cannot use it in a condition expression.

Check here for more details

https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Data-Type-Comparison-Rules.html

 

Hope it helps.

Damith


Alperen
Sidekick (Partner)
Forum|alt.badge.img+5
  • Sidekick (Partner)
  • 35 replies
  • March 22, 2024
Hi,If you explain in detail the query you want to make, I can help you in a different format.

haritha.waidyaratne
Sidekick
Forum|alt.badge.img+5

Hi Alpenen,

Thanks for offering to help. I have already accomplished the task. My question was why Exists() doesn’t work as expected.

Kind regards,


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings