Subject Re: [firebird-support] Basic SQL Update query question
Author Nick Upson
update collection COL
set COL.disp_browse = 'N'
where COL.user_no IN (select u.user_no from user_account u where
u.expire_date = cast('NOW' as date));


On 01/11/06, vladman992000 <myles@...> wrote:
> Forgive my naivety, but I have a statement like so:
>
> update collection COL
> set COL.disp_browse = 'N'
> where COL.user_no = (select u.user_no from user_account u where
> u.expire_date = cast('NOW' as date));
>
> When the Select part of the query returns multiple rows, it fails with
> a Multi Rows in Singleton result set.
>
> What is the best way to re-write this statement so that it updates all
> resulting items assuming the Select returns many records?