Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Calling Oracle Function From Webfocus

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Calling Oracle Function From Webfocus
 Login/Join
 
<Vijaya_settu>
posted
I am trying to call an "Oracle function" from webfocus code. I appreciate any one have suggestion for this issue?
 
Report This Post
Expert
posted Hide Post
Vijaya, you might want to use the Search button and type in 'Oracle function'. There are a number of hits. Here is one of them:
http://forums.informationbuild...681077331#3681077331


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
This topic is similar to yours; please take a look at it: Oracle functions

- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
<Vijaya_settu>
posted
Ginny-I used search button"Oracle Function" before I posted this issue in the user forum.I could find any thing for my problem.

I will open a case with IBI.

Thanks.
 
Report This Post
Virtuoso
posted Hide Post
Vijaya, what problem do you have? Why would you need to open a case with IBI?

Using an Oracle function from WebFOCUS requires that you create a PL/SQL procedure as a wrapper and "return" whatever you need in a REF CURSOR that can be consumed by WebFOCUS by reading SQLOUT.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
<Vijaya_settu>
posted
Neftali,
I am using Oracle function via passthru.
I 've the below code in my Webfocus. If you looked at the below code i am passing (2588) to get the output. It does give output for what ever id i am passing. But my problem is instead passing one id at time to get the output. I want to list all the value from this record. I apreciate ,is it possible to list all the value from this record.

SQL SQLORA
SELECT scott.BPO_CURRENT_STATUS(2588) FROM DUAL;
END

Thank you
Vijaya
 
Report This Post
Virtuoso
posted Hide Post
Sorry Vijaya, but I don't think I understand your requirement.

quote:
I want to list all the value from this record


What do you mean by that? Your function is supposed to return the Status of whatever ID you pass to it and as far as I can see it does that.

My guess is that you have a table with ID's and you need to make sure that each ID you pass (on a row-by-row basis) is returned along with the corresponding status?

If that is what you need, then you have to change the structure of your SQL; there is nothing wrong here with using an Oracle function from WebFOCUS.

I would potentially do something like this assuming you have a table called MYTABLE that contains the ID's you want to evaluate:

SQL SQLORA
SELECT SCOTT.MYTABLE.ID AS 'ID',
       SCOTT.BPO_CURRENT_STATUS(SCOTT.MYTABLE.ID) AS 'STATUS'
       FROM SCOTT.MYTABLE
;
END


Now, I would question the necessity of doing such a thing which usually ends up with a not-too-performant query, for you see, executing a PL/SQL function for each record in a SQL query is very inefficient due to SQL <-> PL/SQL context switching, but this is an Oracle architectural thing that is out-of-scope for this forum.

Give that code a try for yourself preferably using a SQL client (leave WebFOCUS out for now) until you get what you need. Once it works, put whatever query you end up with betwen SQL SQLORA ... END and it should work.

However if you could rewrite your query to do whatever your function is doing in "pure and straight" SQL, your business users will certainly appreciate the performance gains. Of course, if you're dealing with a table with a few hundred or maybe thousands of records this may not be such a big deal but in a DSS environment with millions and millions of records it does make a difference.

I think Oracle 11g offers some function "caching" stuff that may/may not help alleviate performance issues due to context switching but I have no idea as to whether or not that would be applicable to your case of if you have Oracle 11g at all.

This message has been edited. Last edited by: njsden,



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Calling Oracle Function From Webfocus

Copyright © 1996-2020 Information Builders