TABLE VALUED FUNCTION
USE [SystemTracker] GO /****** Object: UserDefinedFunction [dbo].[FN_WEEKDATE_START_END_WITH_NAME] Script Date: 17-11-2021 15:36:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*--------------------------------------------------------------------------------------------------------- FUNCTION NAME : FN_WEEKDATE_START_END_WITH_NAME FUNCTION / PURPOSE : FUNCTION WILL RETURN WHOLE WEEK DATE WITH WEEK DAY NAME TABLE FOR PROVIDED DATE AUTHOR NAME : SATISH SAINI CREATED DATE : 09-10-2018 REVISION HISTORY 1 : -----------------------------------------------------------------------------------------------------------*/ /* SELECT * FROM DBO.FN_WEEKDATE_START_END_WITH_NAME ('2018-10-08') */ ALTER FUNCTION [dbo].[FN_WEEKDATE_START_END_WITH_NAME](@P_DATE DATE) RETURNS @OUTPUTTBL TABLE (WEEKDATE DATE, WEEKDAYNAME VARCHAR(20)) BEGIN --------------------------------------------------------------------------------------------- -- DEFINED PARAMETER(S