moving to postgres

This commit is contained in:
Peter Wood
2023-03-04 18:23:05 -05:00
parent 477bfe3cfb
commit 9348a36809
20 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
use Leo
go
create FUNCTION dbo.tvf_GetHolidays(@year int)
RETURNS TABLE
AS
RETURN (
select dt, dbo.fn_GetHoliday(dt) as Holiday
from (
select dateadd(day, number, convert(varchar,@year) + '-01-01') dt
from master..spt_values
where type='p'
) d
where year(dt) = @year and dbo.fn_GetHoliday(dt) is not null
)