Reputation: 1023
I've a query like this:
SELECT personas.IDDNI iddni,
PERSONAS.NOMBRE NOMBRE,
PERSONAS.APELLIDO1 APELLIDO1,
PERSONAS.APELLIDO2 APELLIDO2,
PERSONAS.ANTIGUEDAD ANTIGUEDAD,
VACACIONES(personas.IDDNI, to_char(add_months(sysdate, 0), 'YYYY')) VACACIONES
FROM personas personas,
trieniosobservaciones t
WHERE personas.iddni = t.iddni
AND ( personas.iddni = '47656567' )
I'd like to know what VACACIONES(personas.IDDNI,to_char(add_months(sysdate,0),'YYYY')) VACACIONES
does in the query, as depending on the personas.iddni
value it can return one row or give the following error:
The number specified in exact fetch is less than the rows returned.
Upvotes: 0
Views: 45
Reputation: 167822
VACACIONES
is a user-defined function that takes two arguments, an IDDNI
value for a person and a year. Beyond that, we cannot tell you what it does because it is a user-defined function and we do not have access to your database or the source code of the function.
You can find the source-code of the function using:
SELECT *
FROM all_source
WHERE name = 'VACACIONES'
AND type = 'FUNCTION'
ORDER BY owner, line;
and then you can work out what it does.
Upvotes: 1