Prev: greatest value
Next: Query?? or something else?
From: David W. Fenton on 26 Jan 2010 21:47 =?Utf-8?B?U2FyYWg=?= <Sarah(a)discussions.microsoft.com> wrote in news:BB6ED13D-C3D9-4BE6-996F-EC6D12CBDDB6(a)microsoft.com: > Are there guidelines out there as to when it might be > best to adopt one approach over the other? The simplest guideline is this: If you're making exactly the same change to all the records, a SQL UPDATE will definitely be faster. If you're making a change based on logic that is specific to each row but that draws all of its criteria from the row that's being updated, a SQL UPDATE will almost always be faster. If you're doing your update based on information drawn from another table or from other records in the same table, it depends. I'd always try SQL first before attempting to code it sequentially. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/ |