Calling function in oracle stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
allavivek
Premium Member
Premium Member
Posts: 211
Joined: Sat May 01, 2010 5:07 pm

Calling function in oracle stage

Post by allavivek »

Hi All,

How can i call function with output argument in oracle stage

as function(output);

i tried calling

select function(':1') from DUAL;

Iam getting following error...
main_program: aptoci.C:446 failed. Message: ORA-00911: invalid character
Query failed: SELECT function(':1') from DUAL;
; Oracle Error: 0


Any suggestions...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That would need to be in a reference lookup for that parameter binding to have a chance to work correctly - are you?
-craig

"You can never have too many knives" -- Logan Nine Fingers
allavivek
Premium Member
Premium Member
Posts: 211
Joined: Sat May 01, 2010 5:07 pm

Post by allavivek »

chulett wrote:That would need to be in a reference lookup for that parameter binding to have a chance to work correctly - are you? ...
No chulett,

I want to call just function with output argument with out lookup....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You cannot if you want to leverage a bind parameter like that, I'm afraid. Where are you trying to do this, on the source or target side? What are you trying to bind into that :1 spot?
-craig

"You can never have too many knives" -- Logan Nine Fingers
allavivek
Premium Member
Premium Member
Posts: 211
Joined: Sat May 01, 2010 5:07 pm

Post by allavivek »

chulett wrote:You cannot if you want to leverage a bind parameter like that, I'm afraid. Where are you trying to do this, on the source or target side? What are you trying to bind into that :1 spot?
Hi chulett,

actually i went through dsxchange for calling a function and found this syntax.


Can you tell me how to call a function with arguments in DS.

thanks..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In. A. Reference. Lookup. :?

And you did not answer any of my questions, which makes it difficult for any continued help.
-craig

"You can never have too many knives" -- Logan Nine Fingers
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

syntax of calling function in oracle stage

select <<functionname>>(<<column1,column2>>) <<result alias column>> from <<table name>>
Srinu Gadipudi
kwwilliams
Participant
Posts: 437
Joined: Fri Oct 21, 2005 10:00 pm

Post by kwwilliams »

Srinivas,

That's not what Craig is asking you. He wanted to know what columns you need to pass to the function to have it return your result. I think he understood the syntax you are stated.

I believe the syntax you would need to use is:

select functionname('ORCHESTRATE.COLUMNNAME') as RETURNCOLUMNNAME from dual

This would be done from a sparse lookup obviously.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The sticking point is the bind variable in the select. That makes it only viable in a reference lookup if their "with arguments" requirement means it is being driven by and needs to be applied, row by row, to the input data. I'm trying to determine if that is actually what they need to do or if it is just literally syntax they "found" while searching the forums here, as stated earlier.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply