Re: Duplicate column (libellecommune) exists in view.
Posted in 1998
Eric Bacher wrote:
> I have an unexpected behavior when using Informix SQL. I try to create
> a
> view where I make a join between 2 tables with the same column name.
> In
> the Select, I use an alias to distinguish these 2 columns. However,
> when
> creating the view, I have the following error:
>
> 531: Duplicate column (libellecommune) exists in view.>
> here is the create command:
>
> create view localisation as
> select bibliotheque.numeronotice,
> phy.libellecommune,
> com.libellecommune
> from bibliotheque,
> outer commune phy,
> outer commune com
> where bibliotheque.numeroinsee = phy.numeroinsee
> and bibliotheque.numeroinseecom = com.numeroinsee>
> Thanks for your help.
>
> Eric.
>
> -------------------==== Posted via Deja News
> ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Hi Eric,
try the follwing SQL:
create view localisation
(numeronotice, phy_libellecom, com_libellecom)as
select bibliotheque.numeronotice,
phy.libellecommune,
com.libellecommune
from bibliotheque,
outer commune phy,
outer commune com
where bibliotheque.numeroinsee = phy.numeroinsee
and bibliotheque.numeroinseecom = com.numeroinsee
Cheers, Peter