|
Posted by Chris on 01/29/07 23:11
Unfortunately I just have the email addresses.
I know I can get the primary key for an individual record using a
select statement like the one below.
use maindb
go
select *
from dbo.tblLead
where email = 'bad@address.com'
Is there a way to use the excel list in the place of the single bad
address and then dump the results into a new table? Then do the
update as described below as a separate process? If I wanted to just
delete bad addresses where I don't have a new address and leave the
rest of the lead information alone could I do that using an Inner join
in my update? All references I have found to the delete statement
talk about deleting entire rows of data and I don't want to do that.
Chris
On Jan 26, 6:32 pm, "Steve" <morrisz...@hotmail.com> wrote:
> If your Excel file has a column matching the the Primary Key of the
> database table, in addition to the email address column, you can use
> DTS(2000) or SSIS(2005) to import it into a table and use an INNER JOIN
> in you UPDATE.
>
> On Jan 26, 4:23 pm, "Chris" <cjscu...@gmail.com> wrote:
>
> > I got got a pile of bad email addresses to update in our SQL database.
> > I know how to do this for individual records using the update command.
> > Is there a way to execute an update using the list of addresses in an
> > excel spreadsheet or some other form of list? This kind of scripting
> > is new territory for me.
Navigation:
[Reply to this message]
|