0

hi.
i have to print the time table in database .. like rows and columns. for example like this
1 2 3 4
mon
tue
wed
thu
fri
sat
so ,how to write the query and how to insert the rows and columns .can u tell me the answer..

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by sknake
0

I don't understand what data you're looking for. You can use a combination of a for or while loop to generate the data. You can also use DatePart and DateName to get specific information about dates and times. Please elaborate on your desired cursor and we'll go from there.

0

hi,
i mean print the time table in below format in database.1,2 are the periods(classes),and mon,tue,wed etc are the days. i am developing the school time table. In my design form,i created the table like this. inserting the data and after click on button the data will be saved in database in the below format. or else tell me the process ,how to develop the school time table. so can u tell me the code or process for that. thank you sir.
1 2 3 4
mon maths english science physics
tue computers --- ----- -----
wed ----- --- --- --- -----
thurs ------ ---- ---- ---- ----

0

You should have one table with the days of the week. Another table with the courses. And another table with what courses are offered on what day. Then given your sample data you would want to pivot the data but this would probably best be done in a query because you may have 6 classes on monday, 2 on wednesday, and 0 on saturday. The number of columns can't vary based on row unless you want to fill the undeeded columns with null but then you're starting to talk about bad design.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.