Articles in this section
Category / Section

How to execute the Microsoft SQL table-valued function in Bold BI

Published:

Bold BI allows you to execute the table-valued function using the Microsoft SQL data source code view by following these steps.

Creating a table-valued function in the Microsoft SQL server

Create a table-valued function in the Microsoft SQL Server before connecting the data source in Bold BI.
Sample query:

CREATE FUNCTION tableValuedReleases (
   @ReleaseId INT
   )
   RETURNS TABLE
   AS
   RETURN
   SELECT
   ReleaseId,
   ReleaseDate,
   ReleaseVersion,
   LastModifiedDate,
   IsActive
   FROM
   Releases
   WHERE
   ReleaseId = @ReleaseId; 

Executing the table-valued function in Bold BI

  1. Refer to the instructions for Connecting Bold BI to SQL data source in order to successfully establish the connection.
  2. After connecting to the data source, switch to the code view by enabling the slider option in the tools pane in the data design view. You will then find the query editor window where you can execute custom queries.
    tablevalued-code-view.png
  3. Here, you can enter the query to retrieve data from the tableValuedReleases table-valued function by providing the value for the ReleaseId parameter. Once you have entered the query, click on the Run button to execute it.
    table-valued-query.png
  4. You can view the data for your query at the bottom of the query editor by clicking Update.
    table-valued-data.png
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
NG
Written by Nisanth Gunasekaran
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied