Search Postgresql Archives

How to update multiple rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux