if not exists (select name from dbo.sysobjects where name='F_T_GetJournal')
begin
	exec('create FUNCTION dbo.F_T_GetJournal() returns @tbl table(ID int) as  begin return  end')
end