Re: Deleting Multiple Rows
From: Joe Celko (jcelko212_at_earthlink.net)
Date: 08/16/04
- Next message: Joe Celko: "Re: Nested select"
- Previous message: Papanii: "sql stored procedures"
- In reply to: Guadala Harry: "Re: Deleting Multiple Rows"
- Next in thread: Guadala Harry: "Re: Deleting Multiple Rows"
- Reply: Guadala Harry: "Re: Deleting Multiple Rows"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Aug 2004 15:02:20 -0700
>> The logic that determines which rows to delete has to stay in the
application (can't realistically be moved to the db). <<
Why? The only reason I can come up with is that a human being or
external agent is making unpredictable numbers as they go along. If
there was an algorithm, then you ought to be able to put it in the WHERE
clause of a DELETE FROM statement.
>> Too bad there's not an easy way to pass a varchar variable
(containing a delimited list of the ints) to the WHERE clause of the
DELETE statement... <<
There are a bunch of such kludges posted here. They are all dangerous
and slow thanks to dynamic SQL.
--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Joe Celko: "Re: Nested select"
- Previous message: Papanii: "sql stored procedures"
- In reply to: Guadala Harry: "Re: Deleting Multiple Rows"
- Next in thread: Guadala Harry: "Re: Deleting Multiple Rows"
- Reply: Guadala Harry: "Re: Deleting Multiple Rows"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|