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.
| Author |
Topic |
|
rameshsri
Starting Member
2 Posts |
Posted - 2011-07-05 : 08:46:42
|
| Hi, I am creating one table and insert some values it means likeTecher TableId TeacherName DeptId Deptname1 gokul 1,2 CSE,EEE2 Sathish 1,2,3 CSE,ECE,ITI want write one store procedure it means in where condition i want to give the id is 2 and deptid is 2 meansit will fetch the information likeId TeacherName DeptId Deptname2 Sathish 2 ECE U don't know how to fetch that i need helpRamesh Srinivasan |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-07-05 : 08:55:33
|
Your problem is a messy table - don't do that. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
|
pduffin
Yak Posting Veteran
68 Posts |
Posted - 2011-07-05 : 19:54:44
|
| This is a one to many relationship so a cross reference table is needed here if you ever want to be able to re-associate a teacher to a dept without loads of unnecessary code. |
 |
|
|
pduffin
Yak Posting Veteran
68 Posts |
Posted - 2011-07-05 : 19:55:26
|
| Look up 3rd normal form 3NF. |
 |
|
|
|
|
|