USE [InnFront]
GO
/****** Object:  UserDefinedFunction [dbo].[ex_Get_Id_hab]    Script Date: 02/27/2012 16:00:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO






ALTER   FUNCTION [dbo].[ex_Get_Id_hab] ( @habitacion varchar(9) )
RETURNS int 
AS
BEGIN
  declare @id_hab int
  
  Select @id_hab  = id_habi 
    From Hotehabi
    Where UPPER( RTRIM(habitacion) ) = UPPER( RTRIM(@habitacion) )

   RETURN @id_hab
END











