3 SELECTs rolled into 1 ?

From: Tarlika Elisabeth Schmitz <postgresql(at)numerixtechnology(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: 3 SELECTs rolled into 1 ?
Date: 2008-06-04 07:41:29
Message-ID: 20080604084129.0fec48a1@dick.coachhouse
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have 3 similar SELECTs. I am wondering whether they could be rolled
into one?

SELECT
item.id
department.id || section.id || category.id as x
FROM item
LEFT JOIN product ON ...
LEFT JOIN department ON ...
LEFT JOIN section ON ...
LEFT JOIN category ON ...

SELECT
item.id
department.id || section.id as x
FROM item
LEFT JOIN product ON ...
LEFT JOIN department ON ...
LEFT JOIN section ON ...

SELECT
item.id
department.id as x
FROM item
LEFT JOIN product ON ...
LEFT JOIN department ON ...

--

Best Regards,

Tarlika Elisabeth Schmitz

A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2008-06-04 07:55:46 Re: 3 SELECTs rolled into 1 ?
Previous Message samantha mahindrakar 2008-06-03 20:53:10 Re: Update problem