Home All Groups Group Topic Archive Search About

How to update price from excel file ?

Author
23 Dec 2005 5:53 PM
msnews.microsoft.com
I dont know which group will be appropriate for this question so I am
posting to all the above groups.


I am running sql2k.  Our company changes the prices every quarter.  Accounts
department works on some figures and finally they set a new price each parts
in excel.

I can update from sql to sql table but I dont know how to update from excel
to sql.

Excel file name is Pricing and columns are:  Part Number and Price.

I want to write a small store procedure so accounts department can create an
excel file and then run the store procedure which will update the price in
sql table.

I would really appreciate if someone please help.

Thanks

Author
5 Jan 2006 11:55 PM
Steve Kass
You can set up a linked server to one Excel file
then update from named regions within that file:

update ...
from yourExcelSvr...SomeRegion

or you can use OPENROWSET to achieve the same
thing.  Better yet, I'd import the Excel data (using either
of these methods) into a staging table, then update, so
you can manage things better.

Search groups.google.com for things like
  "linked server" and Excel and sqlserver
  openrowset and Excel and sqlserver

Steve Kass
Drew University

Show quote
>I dont know which group will be appropriate for this question so I am
>posting to all the above groups.
>
>
>I am running sql2k.  Our company changes the prices every quarter.  Accounts
>department works on some figures and finally they set a new price each parts
>in excel.
>
>I can update from sql to sql table but I dont know how to update from excel
>to sql.
>
>Excel file name is Pricing and columns are:  Part Number and Price.
>
>I want to write a small store procedure so accounts department can create an
>excel file and then run the store procedure which will update the price in
>sql table.
>
>I would really appreciate if someone please help.
>
>Thanks
>
>

>

AddThis Social Bookmark Button