I am just trying to create a function that returns a select statement, but it gives the error:
A RETURN statement with a return value cannot be used in this context.
This is my code:
CREATE FUNCTION [dbo].[Sample] (@SampleValue int)
RETURNS TABLE
AS
BEGIN
RETURN(
SELECT * FROM View_sls
)
Please let me know the solution