Click here to Skip to main content
15,887,436 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Hi guys,
Can anyone help me as i am unable to auto fill the tables in sql server.Consider a situation where you have to fill a time table of a teacher.
You have been given a time table of class and been told that xyz teacher teaches this or that class then you have to make a separate table named same as teacher xyz and you have to give a retrieved schedule of that teacher in the table xyz telling user that in this period on that day xyz teacher is in 8or9or10 or whatever class.
Please help me as soon as possible as i have to use this thing in my project.
Regards,
Akkywadhwa.
Posted
Comments
R. Giskard Reventlov 14-May-12 13:01pm    
We don't do homework.

It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.



Start from here:
1. Design the teacher table that will capture the data
2. Define columns like - Day, Period, Class

Use CREATE Table SQL : MSDN: CREATE TABLE (Transact-SQL)[^]
Use SELECT Table SQL : MSDN: SELECT (Transact-SQL)[^]
 
Share this answer
 
Comments
Wendelius 14-May-12 14:12pm    
Agree.
You should try to put some effort to the problem first as Sandeep stated.

Based on the description you gave, I got the impression that you could investigate the possibilities of INSERT INTO ... SELECT structure. For example: http://blog.sqlauthority.com/2011/08/10/sql-server-use-insert-into-select-instead-of-cursor/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900