Skip to content
Advertisement

Wrong number or types of arguments in call to ‘||’

We are supposed to read a text file, insert that data into a table while taking care of exceptions. This the code for my function:

This is how i’ve called the function (but i think it’s wrong):

And this is the error I’ve got:

I tried to remove the results in the dbms_output and this is what happened:

After running this i got:

Please somebody help, how to fix this?

Advertisement

Answer

Error ORA-01422: exact fetch returns more than requested number of rows happens when your query returns multiple rows but you have an INTO clause which only expects 1 row to be returned.

For example, your three queries:

Error PLS-00306: wrong number or types of arguments in call to '||' is thrown because you are trying to concatenate a string with a boolean at

DBMS_OUTPUT.PUT_LINE('Result for ORDER_FUNC Function is: ' || results); which is not allowed.

Possible fixes for ORA-01422 error: Put your SELECT in a FOR loop like:

Possible fixes for PLS-00306 error: Change the concatenation to

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement