About 1,930,000 results
Open links in new tab
  1. SQL Server passing table columns to a function's parameter

    Jan 11, 2013 · The APPLY operator allows you to invoke a table-valued function for each row returned by an outer table expression of a query.

  2. sql - How to call table valued function inside select Statement ...

    Nov 28, 2014 · Table valued function returns a table and can be used just as a table in a sql query. So may be you can use a join with Emp. use CROSS APPLY. I'm not sure what your schema is like for the UDF, but something like this should point you in the right direction. CROSS APPLY dbo.fun_sample(1)

  3. SQL Server Table-Valued Function By Practical Examples

    This tutorial introduces you to SQL Server table-valued function including inline table-valued functions and multi-statement table-valued functions.

  4. SQL Server : function return column values that can be used in …

    Feb 9, 2017 · CREATE FUNCTION function_name(@inputparams ...) RETURNS TABLE AS RETURN SELECT id FROM table WHERE @inputparams... go select * FROM table WHERE table_id IN ( SELECT column_name FROM function_name(inputparametes) )

  5. SQL Server inline table-valued functions - SQL Shack

    Aug 29, 2019 · In this article, we explored why we should use functions in SQL Server and then learned the usage scenarios of the inline table-valued functions (iTVF). These types of functions make our database development process easier and modular and also, they help to avoid re-write the same code again.

  6. Select Data via a Table-Valued Function in SQL Server

    Feb 6, 2020 · Here’s a quick function that selects basic data from a table via an inline table-valued function. Result: The function looks like this: RETURNS TABLE. SELECT . CatId, CatName, Phone. FROM dbo.Cats. ); This function simply selects all rows from a …

  7. sql server - How to join a table with a table valued function ...

    Dec 14, 2014 · I have a user defined function: create function ut_FooFunc(@fooID bigint, @anotherParam tinyint) returns @tbl Table (Field1 int, Field2 varchar(100)) as begin -- blah blah end Now I want to join...

  8. SQL Server multi-statement table-valued functions - SQL Shack

    Sep 11, 2019 · Multi-statement table-valued function returns a table as output and this output table structure can be defined by the user. MSTVFs can contain only one statement or more than one statement. Also, we can modify and aggregate the output table in the function body.

  9. sql server - How can I pass column to function in sql? - Database ...

    Jan 26, 2016 · There are several ways around this, including using a function to generate the dynamic SQL text itself, which can then be executed by the caller. There aren't really enough details in the question to say which approach would be most suitable for you.

  10. Table Valued Function in SQL Server Examples

    May 12, 2022 · In this tip I will show you the very basics on how to create your first CLR table valued function. There are a few things you have to take into consideration when you decide to code a Table Valued Function.

  11. Some results have been removed
Refresh