Subject | Re: [firebird-support] Basic SQL Update query question |
---|---|
Author | Martijn Tonies |
Post date | 2006-11-01T14:35:31Z |
Hello Myles,
in the select?
that use:
WHERE COL.USER_NO IN (SELECT ...
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> Forgive my naivety, but I have a statement like so:So, you want all COLLECTION records updated for any COL.USER_NO
>
> 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?
in the select?
that use:
WHERE COL.USER_NO IN (SELECT ...
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com