Subject RE: Re[2]: [ib-support] Delete where exists problem
Author Alan McDonald
delete from tbl_service_rel
where tbl_service_rel.id
in (
select tbl_service_rel.id from tbl_service_rel rel join tbl_service svc
on (rel.service_id = svc.service_id)
where svc.party_id = 10700013277)

-----Original Message-----
From: Alexander Tabakov [mailto:saho@...]
Sent: Thursday, 20 March 2003 11:46 PM
To: Helen Borrie
Subject: Re[2]: [ib-support] Delete where exists problem


Ok, it is quite simple

There are 2 tables:

tbl_service -> service_id, party_id, service_data
tbl_service_rel -> service_id, relation_id, relation_data

These are the real tables except that instead of "service_data" and
"relation_data" there are some fields that are of no interest in this
case i think

The statement is:

delete from tbl_service_rel
where
exists(
select * from tbl_service_rel rel join tbl_service svc on
(rel.service_id = svc.service_id)
where svc.party_id = 10700013277)

The select is OK it returns just what I want to. There are several
rows for party_id - 10700013277 in tbl_service_rel

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