IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[genordno]') AND type = 'FN')
DROP FUNCTION [dbo].[genordno]
GO

create function [dbo].[genordno]()
returns int
as
begin

return 0
       end