DELETE Statement won't work correct

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Oct 28 16:11:38 CDT 2004


On 10/28/04 2:21 PM, "SoftIl" <softil at onlinehome.de> wrote:

> Hi Ruslan,
>> This is wrong. DELETE can work only on 1 table.
> Oh, I haven't know this.
> How can I solve this problem?
> 
> At first:
> Select all records from mastertable (basisliste).
> SELECT record_id FROM basisiliste WHERE betriebs_id =
> '15427782-c133-11d8-a802-0010b53f93f'

This select many records ?



> and second:
> In an loop I delete all records in childTable:
> DELETE FROM behandlungsliste WHERE masterrec_id = myVar  //this is the
> variable which include the record_id from the masterrecord
> 
> Is there a faster way to do this?

You can try WHERE ... IN (SELECT)



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list