USE [InnAcc]
GO
/****** Object:  UserDefinedFunction [dbo].[ex_Get_Id_Ejer]    Script Date: 08/09/2012 11:13:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO





ALTER FUNCTION [dbo].[ex_Get_Id_Ejer] ( @ejercicio smallint )
RETURNS tinyint
AS
BEGIN
  declare @id_ejer tinyint

  Select @id_ejer = id_ejer 
   From contejer
   Where ejercicio = @ejercicio

  RETURN @id_ejer
END







