Re: Sorting of data from two tables

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: Sorting of data from two tables
Дата
Msg-id 27CF61B6-2101-4FD7-91BD-DC82C59E9015@yahoo.com
обсуждение исходный текст
Ответ на Sorting of data from two tables  ("R. Smith" <ship.quotes@gmail.com>)
Ответы Re: Sorting of data from two tables  ("R. Smith" <ship.quotes@gmail.com>)
Список pgsql-sql
On Sep 17, 2011, at 9:32, "R. Smith" <ship.quotes@gmail.com> wrote:


What I want to do is do a query joining table A with B and sorting
firstly on a field in Table A then on several fields in Table B.


SELECT a.gdn_gdn, a.gdn_custref, a.gdn_date, a.gdn_address_name,
a.gdn_method, b.gdn_stockref, b.gdn_row, b.gdn_bay, b.gdn_shelf
FROM a
LEFT JOIN b
ON a.gdn_gdn = b.gdn_gdn
ORDER BY a.gdn_method,b.gdn_row, b.gdn_bay, b.gdn_shelf


It would help if you gave an example comparing the above query results with your desired results.  It would also help if you actually provided a detailed description of you goal instead of the generic one quoted above.  Given your stated need the query does exactly what you requested.

David J.

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

Предыдущее
От: "R. Smith"
Дата:
Сообщение: Sorting of data from two tables
Следующее
От: Andreas
Дата:
Сообщение: insert or update within transaction