Subject | Re: Loosely Coupled Properties with Implicit Defaults |
---|---|
Author | robert_difalco |
Post date | 2006-08-04T23:19:40Z |
How about this instead?
SELECT *
FROM T
LEFT JOIN StringVal SV ON T.ID = SV.REF_ID
INNER JOIN StringType ST
ON SV.TYPE_ID = ST.ID AND ST.ID = COLOR
WHERE SV.VAL = "Blue" OR (ST.VAL = "Blue" AND SV.REF_ID IS NULL);
Is that getting closer?
SELECT *
FROM T
LEFT JOIN StringVal SV ON T.ID = SV.REF_ID
INNER JOIN StringType ST
ON SV.TYPE_ID = ST.ID AND ST.ID = COLOR
WHERE SV.VAL = "Blue" OR (ST.VAL = "Blue" AND SV.REF_ID IS NULL);
Is that getting closer?