Page 1 of 1

Calling function in oracle stage

Posted: Mon Sep 27, 2010 1:01 pm
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...

Posted: Mon Sep 27, 2010 2:15 pm
by chulett
That would need to be in a reference lookup for that parameter binding to have a chance to work correctly - are you?

Posted: Mon Sep 27, 2010 2:48 pm
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....

Posted: Mon Sep 27, 2010 3:41 pm
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?

Posted: Mon Sep 27, 2010 5:32 pm
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..

Posted: Mon Sep 27, 2010 8:29 pm
by chulett
In. A. Reference. Lookup. :?

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

Posted: Tue Sep 28, 2010 1:46 am
by srinivas.g
syntax of calling function in oracle stage

select <<functionname>>(<<column1,column2>>) <<result alias column>> from <<table name>>

Posted: Tue Sep 28, 2010 7:09 am
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.

Posted: Tue Sep 28, 2010 7:15 am
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.