One way to do it is to import the CSV to a temporary table. You can update using SQL after that. This sort of thing can be done with a script or a stored procedure.
Sent from my iPhone
> On Oct 4, 2017, at 9:36 AM, Newton, Ernie <[log in to unmask]> wrote:
>
> Greetings,
>
> I know this is not an SQL listserv, but thought I'd give it a try...
>
> Do any of you know how, using MS SQL, to update a field in a table from a comma-delimited file?
>
> Here's what I'm looking at...
>
> My employee table consists of
>
> employee ID,
> name,
> address,
> phone number,
> email address
>
> I have a file consisting of employee ID and email address.
>
> I want to update employee table with email address when employee ID's match..
>
> I know how to do this with Suprtool tables, but I don't have Suprtool for MS SQL. (sad to say)
>
> Thanks in advance,
>
> Ernie
>
> ________________________________
>
> This message, including any attachments, is intended solely for the use of the named recipient(s) and may contain confidential and/or privileged information. Any unauthorized review, use, disclosure or distribution of this communication(s) is expressly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy any and all copies of the original message.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|