Skip to content
Advertisement

call oracle function with parameters

I started to learn pl/sql.I have problem with functions.I created a function like this

I want to call this function like this

select GET_RANK_INFO('12345',to_date('10/03/2019','dd/mm/yyyy'),null) from dual; but it gives error like that the number of argument types invoked is incorrect

I converted my calling to pl/sql block structure but my code gives still same error:

Advertisement

Answer

Such a function is doubtful; it would be OK if it returned one value, but – returning it along with several OUT parameters smells very much like a procedure you should be using instead. So, here’s an example of how to do it:

Testing:


In case you insist on a function, oh well, here you are; as you can see, it is pretty much similar to previous example:

Testing:

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