Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle: no data found, but it has result actually

user-zhe6iMar 20 2023 — edited Mar 21 2023

Hello all,

I met a strange scenario which throw No_data_found exception in function, but actually, it has result.

I create a function to fetch a view as picture 1. I called the function from another function, and it return ‘No_Data_Found’ as picture 2 shows

picture 1

picture 2

But I double-check the query by sql developer, it has result as below picture.

I don't know why and very strange, if someone met the same situation.


I think I need to plus more information about the scenario.

I have a table WA, and a view V_WA.

In FUNCTION1, insert new data into WA, then call FUCNTION2.

In FUNCTION2, I need to SELECT V_WA, but throw ‘NO_DATA_FOUND’.

I don't know if clearly, pls let me know if any .

Comments

Post Details

Added on Mar 20 2023
21 comments
1,825 views