Subject Re: [ib-support] Selects and Updates based on sub-queries
Author Joao Carlos
you need an alias to each table
try this:

update Table1 a
set a.Flag = -1
where a.RecNumber in (select b.RecNo from Temp_Table b)


At 12:57 07-05-2002, you wrote:
>Hi,
>
>I'm using values in a temporary table as a means to select rows from
>a main table, as in the example below:
>
>update Table1 set Flag = -1 where RecNumber in
>(select RecNo from Temp_Table)
>
>However when I run this query it does not seem to terminate, and the
>IBServer process processor usage goes up to 99% even when there are
>very few
>rows in the temporary table.
>
>Is there a better way to write this type of query or could there be
>something wrong with my Server setup?
>
>Thanks in advance,
>
>Sean
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




Cumprimentos,

Joao Carlos
mailto:jc@...

Bitminho - Soluções Informáticas, Lda.
http://www.bitminho.pt
===================================
desenvolvimento de software específico
soluções para gestão
software para Mediadores de seguros
comunicações e soluções para intranet/internet
===================================