salah jubeh wrote:

Hello Guys,

In the past I had a view defined as follows

CREATE view abcd as
SELECT whatever ...... --- query1

Some business requierments came up and I had to change it like this

CREATE view abcd as
SELECT whatever ...... --- query1
UNION
SELECT whatever ......---- query2

1. You sure you need UNION and not UNION ALL?

2. Can you post more detail example?

For example:

select anything from first_table
union
select anything from second_table
where anything == something;

This way WHERE clause is a part of second subselect and will not be propagated to the first one.

--
Sphinx of black quartz judge my vow.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to