FN_Split() Table Valued Function by SQL Instructor Jeff Jones
FN_Split() Table Valued Function by SQL Instructor Jeff Jones
The link above is to a file with a table-valued function called fn_split(). This function allows you to pass a string of values to an IN clause of a SQL query. It breaks them down into a set of rows in a virtual table. Then you use a subquery in the IN clause.
This function is very useful when passing multi-valued parameters in a SQL Server Reporting Services report into a stored procedure. The parameter is defined in the stored procedure as a large varchar string (max 8000 character). In the stored procedure you would reference the function in the WHERE clause where you want to use the multiple parameter values.
Example:
SELECT *
FROM table
WHERE column IN (SELECT [value] FROM dbo.fn_split(@parameter, ','))
You May Also Like
FN_Split(), IN Clause, SQL, SQL Query, SQL Server, Table Valued Function
Agile Methodology in Project Management
0 184 0In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management
An Overview of Office 365 – Administration Portal and Admin Center
0 946 3This is part 1 of our 5-part Office 365 free training course. In this Office 365 training video, instructor Spike Xavier introduces some of the most popular services found in Microsoft Office 365 including the Admin Portal and Admin Center. For instructor-led Office 365 training classes, see our course schedule: Spike Xavier SharePoint Instructor – … Continue reading An Overview of Office 365 – Administration Portal and Admin Center
Creating Users and Managing Passwords in Microsoft Office 365
0 793 4In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365. For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365