Subject Re: [firebird-support] Basic SQL Update query question
Author Martijn Tonies
Hello Myles,

> 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?

So, you want all COLLECTION records updated for any COL.USER_NO
in the select?

that use:


Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
My thoughts:
Database development questions? Check the forum!