Seamus,
Option #1: Simply delete everything in the database and then add everything in
the new group list. No need for updates. You can get away with this because
the new group list contains all of the fields (i.e. 2) in the database table,
if I read you right.
Option #2: Remove items in-the-database-but-not-on-the-new-group-list *before*
you loop over the list. There are two ways to do this:
(a) Make a query for everything in the database table. Loop over this query
and see if the current row is in the new group list. If not, delete it.
(b) If you can get all of the new group list's primary keys at once, you can do
all of the deletions at once. If GroupCode is the primary key:
delete from tblGroupCopy where GroupCode not in (new-group-list-GroupCodes)
-David
On Thursday, June 07, 2001 Seamus Campbell [SMTP:[EMAIL PROTECTED]] wrote:
> However I cannot work out how to account for items originally on database but
> not on new group list i.e. groups that need to be deleted from original
database
> after update process.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists