The reason why you are getting a Cartesian product is because there is no condition relating "T215 a" to the sub query "(SELECT . . . ) b" - you would have to add another WHERE clause at the end.
But more simply, why not soemthing like:
Code:SELECT a.c1, enumval.value FROM T215 a, FIELD_ENUM_VALUES enumval WHERE enumval.schemaid = 215 AND enumval.fieldid = 7 AND enumval.enumid = a.c7




Reply With Quote