Re: Select and merge rows?

Поиск
Список
Период
Сортировка
От Oliveiros
Тема Re: Select and merge rows?
Дата
Msg-id BANLkTinDJXcVTJb5gCJtws+ma-M36EcjoA@mail.gmail.com
обсуждение исходный текст
Ответ на Select and merge rows?  (Claudio Adriano Guarracino <elninon@yahoo.com>)
Список pgsql-sql
Howdy!<br /><br />Is there a maximum ceilling of three values per order ID? or an ID can have an arbitrary number of
values?<br/><br />Best,<br />Oliveiros<br /><br /><div class="gmail_quote">2011/5/5 Claudio Adriano Guarracino <span
dir="ltr"><<ahref="mailto:elninon@yahoo.com">elninon@yahoo.com</a>></span><br /><blockquote class="gmail_quote"
style="margin:0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0"
cellpadding="0"cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"> Hello!<br />I have a doubt about a
querythat I tried to do, but I cant......<br />This is the scenario:<br />I have a table, with this rows:<br />order   
ID   value    <br />----------------------<br />1    1000    3<br />2    1000    5<br /> 3    1000    6<br />1   
1001   1<br />2    1001    2<br />1    1002    4<br />2    1002    4<br /><br />I need to get this table, divided by
ID,like this:<br />id    value1    value2    value3<br />--------------------------------<br /> 1000    3    5    6<br
/>1001   1    2<br />1002    1    2<br /><br />How I can do this?<br />I tried with cursors and view, but i
can't....<br/>Any help is welcome!<br /><br />Thanks in advance!<br />Regards,<br /><br
/></td></tr></tbody></table></blockquote></div><br/> 

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

Предыдущее
От: Claudio Adriano Guarracino
Дата:
Сообщение: Select and merge rows?
Следующее
От: Claudio Adriano Guarracino
Дата:
Сообщение: Select and merge rows?