The syntax should be like
Create Function
Returns
(
Table Definition here
..
..
)
as
BEGIN
..
..
RETURN -- note no value is returned here
END
Its all about structured query language (SQL) - SQL Query Snippets, LINQ Snippets, SQL Stored Procedures, SQL Server Articles, SQL Server Feeds, SQL Server Analytics, SQL Server Integration Services (SSIS), Microsoft SQL Server BIG DATA - HortonWorks, SQL Server CRM Integration