﻿if not exists (select name from dbo.sysobjects where name='F_DateDiff')
begin
	exec('CREATE FUNCTION [dbo].[F_DateDiff](@fromDate as int,@toDate as int) returns int as begin return 0 end')
end