How to update multiple rows

Поиск
Список
Период
Сортировка
От venkat
Тема How to update multiple rows
Дата
Msg-id AANLkTim4QDfbyss7C_qB=ezUc-ZQiPDDj3qyLUwbCH2L@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] How to update multiple rows  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список pgsql-sql
Dear All,

  I want to update multiple row in single query.I am trying for below query.I am getting error  as
 
"ERROR: more than one row returned by a subquery used as an expression
SQL state: 21000"

Here is my Query.

update parcelsdata set gid=(select random() * 10),
     kasarano=(select kasarano from parcelsdata),
     murabano=(select murabano from parcelsdata),
     the_geom = (select (st_dump(st_polygonize(st_union(st_boundary(the_geom), the_line)))).geom as the_geom from 
(select gid,kasarano,murabano,st_linefromtext('LINESTRING(' 
||(st_xmin(the_geom)-1)::text||'
'||(st_ymax(the_geom)-the_length)||',
'||st_xmax(the_geom)+1||'
'||st_ymax(the_geom)-the_length||')',24047) as the_line, the_geom from 
(select 100 as the_length, * from parcelsdata) a) b
where gid = 113 GROUP BY gid,kasarano,murabano)

where kasarano='1' and murabano='119'


Please let me know.I am waiting for your great response.

Thanks and Regards,

Venkat

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

Предыдущее
От: Axel Rau
Дата:
Сообщение: Re: Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause [re-post]
Следующее
От: venkat
Дата:
Сообщение: Re: [GENERAL] How to update multiple rows