Subject RE: Re[6]: [ib-support] Delete where exists problem
Author Alan McDonald
your exists clause is selecting all fields with particular criteria..
so you have a set of field values and a number of records (where those
criteria are met)

now you want to delete from a table where there exists "a number of rows of
different field values"..
sounds to me like the engine should delete all rows of this first table as
long as you get any result set from the where select clause...
no?
Alan

-----Original Message-----
From: Alexander Tabakov [mailto:saho@...]
Sent: Friday, 21 March 2003 12:55 AM
To: Alan McDonald
Subject: Re[6]: [ib-support] Delete where exists problem


>your exists isn't really testing anything
>it says... in plain english
>delete all records from this table where there exists any record in another
table

:)) You may laugh but I still don't understand.

First of all if what you say is true why this statement deletes some
times the whole table and sometimes what I realy needed? Data is one
and the same.

Second, I have a "party_id = xxxxx" predicate in the where clause of
the select statement. So why would "exists" work on "any record in another
table"?

Nevertheless I admit using IN is a much better idea.

--
Best regards,
Alexander mailto:saho@...



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/