For any comparison operator listed in the table shown below, the sub-query must return single row (in other words, the sub-query, must be a single-row sub-query, otherwise it will fail)
Symbol | Meaning |
---|---|
= | equal |
> | greater than |
>= | greater than or equal |
< | less than |
<= | less than or equal |
<> | not equal |
!= | not equal |
The operators in the following table can use multiple-row sub-queries:
Symbol | Meaning |
---|---|
IN | equal to any member in a list |
NOT IN | not equal to any member in a list |
ANY | returns rows that match any value on a list |
ALL | returns rows that match all the values in a list |
There are several approaches to resolve this, most popular one being changing the inequality operator to a multiple-row operators (say, if the operator is "=" than change it "IN", "ANY", "ALL", so that it does not matter if multiple rows are returned.).
However, I found that if you use inline views, you can retain inequality operator as shown below in (Screen -2)
Note: In order to get consistent result, use the sub-query based on primary key. The above method is based on unique key
1 comment:
Hi ,
Greetings from Application Plus Technologies !!
We are providing training with certification for the below skill set ,
*Oracle SQL
* Advance SQL
*PLSQL
*Advance PLSQL
* EBS Technical
* Fusion technical
If you are looking for training contact us
WhatsApp No : 8108735227 / 7499992939
Official Email : nida.k@applplus .com
Post a Comment