Subject Re: [firebird-support] Basic SQL Update query question
Author Milan Babuskov
vladman992000 wrote:
> 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));
>
> What is the best way to re-write this statement

Well, others gave you the solution with IN, but that is not "the best
way", as IN can be much slower than EXISTS:

update collection COL
set COL.disp_browse = 'N'
where exists (
select 1 from user_account u
where COL.user_no = u.user_no
and u.expire_date = cast('NOW' as date));

--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org