Top "Sql-function" questions

A function defined in a relational database system.

Why can we not execute a stored procedure inside a function in SQL Server

Why can we not execute a stored procedure inside a function when the opposite is possible?

sql-server stored-procedures sql-function
Table-Valued Function(TVF) vs. View

What's the difference between table-valued functions and views? Is there something you can do with 1 that's hard or impossible to …

sql-server sql-view sql-function
Entity Framework 6 Code First function mapping

I want integrate Entity Framework 6 to our system, but have problem. I want to use Code First. I don’t …

c# entity-framework ef-code-first entity-framework-6 sql-function
How to create a temporary function in PostgreSQL?

I have to execute a loop in database. This is only a one time requirement. After executing the function, I …

sql postgresql sql-function
Incompatible object type when create and alter a table value function in SQL

I'm getting the below error for the given function. Msg 2010, Level 16, State 1, Procedure GetTableFromDelimitedValues, Line 2 Cannot perform alter on 'dbo.…

sql sql-server sql-server-2008 sql-function create-function
SQL Stuff Function with Variable in SQL Server

I am trying to generate an Pivot table with SQL (SQL Server 2008). To get the column list I am using …

sql sql-server-2008-r2 sql-function
How to split a single row into multiple rows in SQL

I have a table which looks as follows..it has multiple columns for different latencies Date API Latency1_Avg Latency1_…

sql sql-server sql-server-2012 sql-function sqlperformance
TSQL Error: A RETURN statement with a return value cannot be used in this context

I am just trying to create a function that returns a select statement, but it gives the error: A RETURN …

sql tsql sql-server-2005 sql-function
ExecuteScalar always returns null when calling a scalar-valued function

Why does this return null? //seedDate is set to DateTime.Now; con is initialized and open. Not a problem with …

c# sql sql-server sql-function
PostgreSQL function or stored procedure that outputs multiple columns?

Here is what I ideally want. Imagine that I have a table with the row A. I want to do: …

postgresql stored-procedures plpgsql sql-function