set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go createFUNCTION[dbo].[fnQuarterString] -- returns quarter in form of '3Q2000' to which specified date belongs. ( @dtmDatedatetime ) RETURNSchar(6) -- quater like 3Q2000 AS BEGIN RETURN ( DateName(q, @dtmDate) +'季度'+DateName(yyyy, @dtmDate)) END
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgocreate FUNCTION [dbo].[fnQuarterString]-- returns quarter in form of 3Q2000 to which specified date belongs. ( @dtmDate datetime )RETURNS c