k with this
data probably know that 10 is Freshman, and 20 is Sophomore, and 00 is
"someone who just applied" or whatever.
What's so 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
uite happy 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
s', 's', 'Senior');
SELECT C.code_text 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
omore');
INSERT INTO codes VALUES ('class', 'J', 'Junior');
INSERT INTO codes ('class', 's', 'Senior');
SELECT C.code_text AS academic_class
FROM students S
LEFT JOIN codes C ON (C.code_type='class' AND S.class=C.code_key);
That p
27;, 'Senior');
SELECT C.code_text 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 possib