FUNCTION GET_INFORMATION(
O_error_message OUT VARCHAR2,
O_NAME OUT VARCHAR2,
O_ADDRESS OUT VARCHAR2,
I_PERSON_ID IN PERSONS.PERSON_ID%TYPE )
RETURN BOOLEAN;
I use a Stored Procedure stage to call this function and get names, addresses.
It would be better if you convert the function a SP and use the StoredProcedure stage. I did like that in one the projects since i felt that the function was not working as desired using the SP stage
Assuming the problem is with reutrn type. In function it is Boolean, in DS job it is Varchar. Not sure if Boolean is supported in DS 7 version for Oracle.
That's PL/SQL, not a script... and I have no idea what this has to do with your original question.
Is 'GET_INFORMATION' your stored function? If so, as noted, you would include it in a normal SQL select as if it were a column in a table. If you don't have a need for a table, use DUAL. For example:
SELECT GET_INFORMATION(X,Y,Z) FROM DUAL;
-craig
"You can never have too many knives" -- Logan Nine Fingers
Thank you, but it can be performed because of 2 reasons:
+ PERSON_ID isn't a fixed value, it is the output of dataset file
+ Function doesn't return columns values, it only return boolean value
With procedure, it is easy to call it in Datastage. Otherwise with function, you can also call it when it doesn't return a boolean value (can be replaced by VARCHAR, NUMBER..)
If you insist on treating it like a stored procedure, why not make it a stored procedure? Otherwise, study up on how to properly leverage functions, there are lots of examples out there - here as one example.
-craig
"You can never have too many knives" -- Logan Nine Fingers
chulett wrote:If you insist on treating it like a stored procedure, why not make it a stored procedure? Otherwise, study up on how to properly leverage functions, there are lots of examples out there - here as one example.
Thank you.
It is a function in Oracle sever that I only can view. I tried get SELECT from this function but I was fail. Of course, because it return a unrelated value (True or False).
In my opinion, it is impossible to resolve this problem.