CREATE PROCEDURE dbo.OnlineFindMaxRoomsAll  @HotelNumber INT  AS
SET NOCOUNT ON

/*
    Created by Troels Buch Dec 2007
    
    Changes:    
	

    NOTES: 	- 
*/

Select distinct onlineroomtypes.onlineroomtypenumber, Maxrooms
FROM OnlineRoomtypes WITH (NOLOCK)
INNER JOIN Roomtypes WITH (NOLOCK) ON Onlineroomtypes.Onlineroomtypenumber = Roomtypes.onlineroomtypenumber 
AND IsNull(Roomtypes.Hotelnumber, 0) = @HotelNumber
INNER JOIN YieldonlineRoomtypesxtab WITH (Nolock) on onlineroomtypes.onlineroomtypenumber =YieldonlineRoomtypesxtab.onlineroomtypenumber
AND MaxRooms <> 0
