Re: My query table aliases don't exist in my application

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: My query table aliases don't exist in my application
Дата
Msg-id 4D483940020000250003A145@gw.wicourts.gov
обсуждение исходный текст
Ответ на My query table aliases don't exist in my application  (Hugo Garza <hiro2k@gmail.com>)
Ответы Re: My query table aliases don't exist in my application
Список pgsql-jdbc
Hugo Garza <hiro2k@gmail.com> wrote:

> I'm going a complex join on 5 tables and some of them have a
> column that repeats in two tables called "name". So I created an
> alias for each table, one of them called co, and in my application
> I do a result.getString("co.name"). But the application fails
> with: "The column name co.name was not found in this ResultSet."

Try giving the result column an alias:

select co.name as co_name

Then access it by the name you have given it.

Personally, I've never seen that other usage, and would never have
expected it to work.

-Kevin

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

Предыдущее
От: Hugo Garza
Дата:
Сообщение: My query table aliases don't exist in my application
Следующее
От: Maciek Sakrejda
Дата:
Сообщение: Re: My query table aliases don't exist in my application