I need to select static colums + a dynamic number of rows as columns in SQL
TABLE 1 ------- HotelID BlockID BlockName TABLE 2 ------- BlockDate (unknown number
Do this in the client.
SQL is a fixed column language: you can't have a varible number of columns (even with PIVOT etc). Dynamic SQL is not a good idea.