Search found 8 matches

by vietnq254
Fri Sep 10, 2010 12:28 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

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 ...
by vietnq254
Thu Sep 09, 2010 9:06 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

HariK wrote:Assuming the problem is with reutrn type. In function it is Boolean, in DS job it is Varchar.
Yes it is. So if function doesn't return a Boolean value, I can use Stored Procedure stage to call it like above.
by vietnq254
Thu Sep 09, 2010 9:02 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

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 ...
by vietnq254
Thu Sep 09, 2010 12:30 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

How do you think about this script below? DECLARE O_ERROR_MESSAGE VARCHAR2(200); O_NAME VARCHAR2(200); O_ADDRESS VARCHAR2(200); I_PERSON_ID NUMBER; v_Return BOOLEAN; BEGIN I_PERSON_ID:= 304; --Set input value v_Return:= GET_INFORMATION (O_ERROR_MESSAGE, O_NAME, O_ADDRESS,I_PERSON_ID); execute immedi...
by vietnq254
Wed Sep 08, 2010 8:54 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

chulett wrote:You 'call' them by including them in a SQL select statement.
Can you help me to give the SQL statement?
by vietnq254
Wed Sep 08, 2010 2:23 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

In Parameters tab, I set: O_error_message = ERROR_MESSAGE Output O_NAME = NAME Output O_ADDRESS = ADDRESS Output I_PERSON_ID = PERSON_ID Input v_Return = v_Return Function In Input Columns tab: PERSON_ID Decimal 3,0 In Output Columns tab: ERROR_MESSAGE VARCHAR NAME VARCHAR ADDRESS VARCHAR v_Return V...
by vietnq254
Wed Sep 08, 2010 12:29 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

Sreenivasulu wrote:It would be better if you convert the function a SP and use the StoredProcedure stage.
Thank you but I don't have permission to modify this function in Oracle.
by vietnq254
Tue Sep 07, 2010 11:11 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Call an Oracle Function by using Stored Procedure stage
Replies: 13
Views: 10289

Call an Oracle Function by using Stored Procedure stage

Hello everybody, I have a function in Oracle like below: 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. Job flo...