Re: FN-FORUM: SQL help
date posted 7th September 2007 17:21
Some one should refactor it some time. It will just fester.
Add a new table with 3 columns:
tblCourseCodes
CodeNum (is a byte sized integer contrained to: {1,2,3,4})
CourseCode
CourseID (is a Foreign key of tblCourse.ID)
The primary key of this table has duplicate columns either
CourseID,CodeNum or
CourseID,CourseCode
Check out: "Refactoring Databases", ISBN: 0321293533
I nice looking book but I don't personally have it as I have been binging on
books lately and need to exercise some self control.
----- Original Message -----
From: "Dom Latter" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Friday, September 07, 2007 5:22 PM
Subject: Re: FN-FORUM: SQL help
> On Thursday 06 September 2007 14:52:29 Paul Cooper wrote:
>
>> strCourseCode1, strCourseCode2 etc I already know from an earlier page
>> query (they are stored in tblCourses). I know about the best practice
>> issues previously mentioned about using CourseCode1, CourseCode2 etc.
>> but I inherited this and so left it.
>
> How much pain would it cause to fix this, and how much pain would it save?