Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Can't figure this out...

Author  Topic 

tl121000
Starting Member

1 Post

Posted - 2008-08-02 : 23:59:21

The database EXAMPLE defines the following data
-On day A it meets for 6th period and 7th period in room 242
-On Day B the class meets only 6th period in the same room.
-So it is a double period only one day  day A.

EXAMPLE DATA SET - MULTITUDE OFF COMBINATIONS (PER, COURSE, SEC, ROOM)
_____________________________________________________________________
Room Per Day Course Desc Course Sec Teacher
216 6 AB Algebra 1 M401 1 242
216 7 A Algebra 1 M401 1 242

What I need to do is write a script to have two rows per class still but splitting the AB days with a concatenated period field (i.e. 6-7) for double period instances...

Room Per Day Course Desc Course Sec Teacher
216 6-7 A Algebra 1 M401 1 242

216 6 B Algebra 1 M401 1 242

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-04 : 04:07:19
Which version of SQL Server are you using?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -