Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE ValueCodes
- (
- Value INTEGER NOT NULL PRIMARY KEY,
- Meaning VARCHAR(32) NOT NULL UNIQUE
- );
- CREATE TABLE Results
- (
- TestID ...,
- TestCode ...,
- Value INTEGER NOT NULL FOREIGN KEY REFERENCES ValueCodes
- );
- ORDER BY IsNumeric(Results.Value) DESC,
- CASE WHEN IsNumeric(Results.Value) = 1 THEN Len(Results.Value) ELSE 99 END,
- Results.Value
Add Comment
Please, Sign In to add comment