Reply to Re: Update bad addresses

Your name:

Reply:


Posted by Chris on 01/29/07 23:24

Unfortunately I only have a list of addresses. I know I can retrieve
the primary key associated with an individual address using the
following select statement or somehting similar.

use leaddb
go
select primary_key, email
from dbo.tblLead
where email = 'bademail@address.com'

Is it possible to use a variable in the where statement that picks up
the data in the excel file and then dumps the results into a table for
the purposes of doing the update as described below? Also if I don't
have a new address to update with how do I delete the email address
but leave the rest of the record in tact? All of the references I
have seen to the DELETE statement refer to deleting rows from the
table. I don't want to do that - only the email address.

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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация