I need the select join statement to be modified depending on the value of
the "type" column, which table >to join with
Well, perhaps you could UNION selects from both child tables and, as
The id of the base and the child is the same, and the same id can not
exists in the two child tables you'd get desired record
