Frank Joerdens wrote:
> mpi=# update index set level = 2 where parentid = ( select id from
> index where level = 1 );
> ERROR: More than one tuple returned by a subselect used as an
> expression. mpi=#
>
> This is a recursive query, on a single table. Is that not possible?
Hi Frank,
as the error message says, the subselect must return only one value,
since the where clause compares just one field for equality. You might
try IN instead of =, ie
update index set level = 2 where parentid in ( select id from
index where level = 1 );
Hope that helps.
Christof
-- gl.aser . software engineering . internet service http://gl.aser.de/ . Planckstraße 7 . D-39104
Magdeburg
Tel. +49.391.7 44 77 10 . Fax +49.391.7 44 77 13 . Mobil 0177.77 92 84 3