Hey guys, got a question here.
I've got a table that holds info that our account holders can import data
into. Right now, it's set to ignore dupes - i.e. I'll filter out any
records from the import (which I bulk insert into a table created for the
import) that have the same content in a certain field, and then insert the
non-dupe info, a la
insert into oldtable
select blah blah
from newtable
But now I want to offer the option to either ignore dupes (current
situation) or update dupes. Updating would entail overwriting most, but not
all, of the fields for any given record in the old table with the matching
fields' info from the new table.
Is there SQL syntax to do this in bulk, along the lines of the
insert/select above? Or am I stuck doing loops on my data and individual
row updates?
Thanks in advance,
--Scott
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm