from hotel_tbl )a Right Join (Select month_id,week_id, date_hotel from Hotel_Calendar) b ON a.romm_reserve_dt = b.date_hotel
I have table that has room reservation information. The problem is that the room reservation information comes in only when the room is reserved in the hotel.(hotel_tbl) if in a week that hotel has no rooms reserved in the table then i cannot see that hotel in this table(hotel_tbl).
So that i can get sums for each week_id for each hotel by counting the reservation_dt.
I am able to get all week_id with the outer join.But i am not able to associate it to a hotel_id. there is another table that has hotel info and there is only one row for each hotel_id in this table. (hotel_data_tbl) Even this has hotel_ID
Can any one help me with this... Is there a replace function in teradata with which i can replace it with the original hotel_id where reservation date is not null for that particular month_id for all week_id.