AS academic_class
FROM students S
LEFT JOIN codes C ON (C.code_type='class' AND S.class=C.code_key);
That particular example might work better with enum but it's a
deliberately trivialized example. Most of my coded fields have 5-20
possible values.
My problem is that I've had some codes imposed upon me
. Most of my coded fields have 5-20 possible values.
My problem is that I've had some codes imposed upon me that are 5 chars. I
don't know if I should just start over or what. Maybe other people deal
with coded fields in a totally different way that is way better than what
I've invented.
Suggestions
with the single binary char approach
until I had to import data from an oracle db. It definately would be
easier for me to translate the new coded field into single chars during the
import than it would be for me to re-do all the coded fields I have so far.
But I was thinking that since I have
difficult about changing your codes table so the code_key is
a varchar(5)? How is that more work than
translating the 5-char codes to 1-char codes and sticking
with what I've got.
??
If somebody had given me a dramitcally better way to
handle coded fields than what I'm already doing, I might have
might work better with enum but it's a deliberately
trivialized example. Most of my coded fields have 5-20 possible values.
My problem is that I've had some codes imposed upon me that are 5 chars. I
don't know if I should just start over or what. Maybe other people deal
with coded fields