kalender.quarter_name.sql 297 B

123456789101112131415161718
  1. SET QUOTED_IDENTIFIER ON
  2. GO
  3. SET ANSI_NULLS ON
  4. GO
  5. CREATE FUNCTION [kalender].[quarter_name] (@Datum AS DATE)
  6. RETURNS VARCHAR(30)
  7. AS
  8. BEGIN
  9. RETURN convert(varchar, datepart(qq, @Datum)) + '. Q. ' + convert(varchar, year(@Datum))
  10. END
  11. GO
  12. SET QUOTED_IDENTIFIER OFF
  13. GO
  14. SET ANSI_NULLS OFF
  15. GO
  16. GO