Subject | Re: [firebird-support] Duplicate record deletion |
---|---|
Author | Arno Brinkman |
Post date | 2005-06-20T22:59:40Z |
Hi,
misunderstood the question.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info
>> Can't you solve it another way? Like:I thought it was the intention to leave only 1 record from all the duplicates, but i could
>>
>> DELETE FROM
>> ppm_mappings m2
>> WHERE
>> NOT SINGULAR(SELECT 1 FROM ppm_mappings m1 WHERE
>> m1.matrix_id = m2.matrix_id and
>> m1.product_id = m2.product_id and
>> m1.process_id = m2.process_id)
>
> If I understand the standard correctly, that should delete all records
> that have duplicates when the query starts. It won't, given the current
> state of Firebird, because we incorrectly execute the subselect for each
> iteration of the delete, so the last record with each set of values
> fails the "NOT SINGULAR" test.
misunderstood the question.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info