From: | Hadley Willan <hadley(dot)willan(at)deeperdesign(dot)co(dot)nz> |
---|---|
To: | Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: missing FROM-clause notice but nothing is missing ... |
Date: | 2003-03-28 06:03:22 |
Message-ID: | 3E83E5AA.30008@deeperdesign.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jean-Christian Imbeault wrote:
> No go with the view ... same error:
>
> DB=# SELECT products.id
> FROM products
> WHERE name ILIKE 'AA'
>
> UNION
>
> SELECT prod_id
> FROM v_products_cast_crews
> WHERE cast_crew=1012
>
> ORDER BY products.id;
>
> NOTICE: Adding missing FROM-clause entry for table "products"
> ERROR: ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of
> the result columns
>
Strange, I actually quickly whipped up the tables and it worked for me?
You did adjust some of the column names appropriately?
Also, the LEFT JOIN's are best treated as a single line too.
Anyway, I looked further in and I see you've got it working.
Still, views are a more convenient way than doing manual UNIONs all the
time.
H
From | Date | Subject | |
---|---|---|---|
Next Message | Ezra | 2003-03-28 10:14:53 | DOES THE UNDERSCORE(_) WILD CARD EXISTS IN POSTGRESQL |
Previous Message | Stephan Szabo | 2003-03-28 05:46:15 | Re: missing FROM-clause notice but nothing is missing ... |