Re: Select problem

Поиск
Список
Период
Сортировка
От NRonayette
Тема Re: Select problem
Дата
Msg-id 39981680.1425B94B@socotec.fr
обсуждение исходный текст
Ответ на Select problem  ("Karl F. Larsen" <k5di@zianet.com>)
Список pgsql-novice
"Karl F. Larsen" a écrit :

>         I have a simple 3 table database with armycall as the common key
> and it all works fine when I doa select like so:
>
>         select user, doer
>         from data, biglist
>         where user.armycall = biglist.armycall;
>
> but if I want to get the column armycall and use:
>
>         select user, armycall
>         from data, biglist
>         where user.armycall = biglist.armycall
>
> I get an error that armycall is ambiguous.
>
>         Does anyone know how to correct this?

You must specify witch column you want in your select : data.armycall or
user.armycall (even if they are equal)

this give you something like this :
"
 select user, data.armycall
        from data, biglist
        where data.armycall = biglist.armycall
"
or
"
 select user, biglist.armycall
        from data, biglist
        where data.armycall = biglist.armycall
"

carefull, you made a mistake : "where user.armycall = biglist.armycall"
user is not a table but a column isn't it  ?


--
Workers of the world, arise!  You have nothing to lose but your chairs.




В списке pgsql-novice по дате отправления:

Предыдущее
От: Chris Ryan
Дата:
Сообщение: Re: Select problem
Следующее
От: John McKown
Дата:
Сообщение: Re: Select problem