Is it possible to use SQLCMD in SQL Server 2008 to create a table and generate data and insert into the table, without manually typing the INSERT statement for each row?
Example:
Suppose there are 10 weeks (1, 2, 3 ... 10) and 2 timings (11 am, 12 pm) and 5 venues (Room 1, Room 2 ... Room 5). Thus there will be a total of 10 x 2 x 5 = 100 rows.
So, is it possible to have a SQL statement that will generate these 100 rows when given the 3 data parameters (week, timing and venue)?
+--------------------------------+
| Week | Time | Venue |
+--------------------------------+
| 1 | 11 am | Room 1 |
| 1 | 12 pm | Room 1 |
| 1 | 11 am | Room 1 |
| |
| 10 | 12 pm | Room 5 |
+--------------------------------+
