Subject Re: [firebird-support] combining 2 left join
Author Vlad Khorsun
> Fb 2.1

You happy as you can use CTE :)

> i have 2 left join queries.how i can combine them or how i can use
> them together?
>
> [code]

WITH
CTE1 AS (
SELECT ... FROM
> GENELDETAIL1 LEFT JOIN SEVK ON
> SEVK.GENELDETAILID=GENELDETAIL1.GENELDETAILID LEFT JOIN SEVKDETAIL ON
> SEVKDETAIL.SEVKID=SEVK.ID
),

CTE2 AS (
SELECT ... FROM
> GENELDETAIL1 LEFT JOIN URETIM1 ON
> URETIM1.GENDETAILID=GENELDETAIL1.GENELDETAILID LEFT JOIN
> URETIMDETAIL1 ON URETIMDETAIL1.URETIMID=URETIM1.URETIMID
)

SELECT ... FROM CTE1 JOIN CTE2 ON ...

Regards,
Vlad