|
Posted by Hilarion on 10/20/05 18:11
> Thx Hilarion, that was exactly what I was looking for. Didn't know
> about CROSS JOIN.
>
> I really do appreciate it!
You could use INNER JOIN with some dumb "ON" clause like this:
SELECT
c.company_id,
c.company_name,
v.variable_id,
v.variable_name,
vv.variable_value
FROM
company AS c INER JOIN
variable AS v ON c.company_id = ?? LEFT OUTER JOIN
variable_value AS vv ON vv.company_id = c.company_id AND v.variable_id = vv.variable_id
ORDER BY
c.company_name,
c.company_id,
v.variable_name,
v.variable_id,
vv.variable_value
Hilarion
[Back to original message]
|