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     [CLOSED] Is there a way to execute SQL Server Table valued Functions from Webfocus?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Is there a way to execute SQL Server Table valued Functions from Webfocus?
 Login/Join
 
Member
posted
Hi All,

Is there a way to execute SQL Server Table valued Functions from Webfocus?
(Like we can execute the stored procedure)


Thanks,
Yeshwanth

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 11 | Registered: September 01, 2015Report This Post
Virtuoso
posted Hide Post
I believe there's a technique for this. Reporting from MSS Table-Valued Functions can be done via synonym for SQL string containing a SELECT * FROM with parameters list. Create synonym for External SQL Script and add Variable definition (VARIABLE NAME=&&VARNAME) to the synonym.

I found this workaround here: https://techsupport.informatio...ttrack/10853551.html


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
dead link


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Virtuoso
posted Hide Post
For example:

1.
 Assume there is a MS SQL Table-Valued Function defined as
 CREATE FUNCTION dbo.ufnGetContactInformation(@ContactID int)
 RETURNS @retContactInformation TABLE
 (
  -- Columns returned by the function
  ContactID int PRIMARY KEY NOT NULL,
  FirstName nvarchar(50) NULL,
  LastName nvarchar(50) NULL,
  JobTitle nvarchar(50) NULL,
  ContactType nvarchar(50) NULL
 );...RETURN;
 END;

2.
 The following SQL can be used to report from the function:
  SELECT
  ContactID, FirstName, LastName, JobTitle, ContactType
  FROM dbo.ufnGetContactInformation(5)
 It needs to be saved to .SQL file.
 Note:
 - no semicolon at the end;
 - parameter @ContactID INT is temporarily used with hard-coded
 value 5, which will be substituted with parameter in the next
 steps

3.
 Create synonym for External SQL Script above and add Variable
 definition (VARIABLE NAME=&&CONTACTID) to the synonym:
 FILENAME=UFNGETCINFO, SUFFIX=SQLMSS , $
 VARIABLE NAME=&&CONTACTID,DEFAULT=1,$
  SEGMENT=UFNGETCINFO, SEGTYPE=S0, $
  FIELDNAME=CONTACTID, ALIAS=ContactID, USAGE=I11, ACTUAL=I4, $
  FIELDNAME=FIRSTNAME, ALIAS=FirstName, USAGE=A50V, ACTUAL=A50V,
  MISSING=ON, $
  FIELDNAME=LASTNAME, ALIAS=LastName, USAGE=A50V, ACTUAL=A50V,
  MISSING=ON, $
  FIELDNAME=JOBTITLE, ALIAS=JobTitle, USAGE=A50V, ACTUAL=A50V,
  MISSING=ON, $
FIELDNAME=CONTACTTYPE, ALIAS=ContactType, USAGE=A50V,
 ACTUAL=A50V,
  MISSING=ON, $

4.
 Add Variable to SQL Script FROM-clause
 dbo.ufnGetContactInformation(&&CONTACTID) and use TABLE to
 produce a report:
 -* using non-default parameter value, e.g. 5:
 -SET &&CONTACTID = 5;
 TABLE FILE UFNGETCINFO
 PRINT *
 END


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report 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     [CLOSED] Is there a way to execute SQL Server Table valued Functions from Webfocus?

Copyright © 1996-2020 Information Builders