none
Can SQL Server Import Web Data, and Write to a Table?

    Question

  • I am wondering if there is a way to use SQL Server to import web data.  Specifically, I’d like to get historical price data for stocks.  Here is an example:

    http://finance.yahoo.com/q/hp?s=SBUX+Historical+Prices

    Can I import the ‘Prices’ data for Starbucks, and write it to a table?

    I’d appreciate any opinions, comments, suggestions, etc.

    Notice, I posted this question in another area and didn't get any responses.  I wonder if this is the correct Forum for this question...


    Ryan Shuell

    Monday, July 16, 2012 4:53 PM

Answers

  • hi Ryan,

    personally I do think this is more a developer question... you should find a way to access that data and write it to your db... you can do that perhaps via a web server, if the referenced web site exposes such a feature, or you have to resort to web scaraping, loading all the required web pages, parsing them some way, and finally write your collected data to your db... but SQL Server can not do that by it self.. you have to do it "your way"...

    regards


    http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools http://www.hotelsole.com/

    • Marked as answer by ryguy72 Monday, July 16, 2012 11:02 PM
    Monday, July 16, 2012 10:01 PM

All replies

  • hi Ryan,

    personally I do think this is more a developer question... you should find a way to access that data and write it to your db... you can do that perhaps via a web server, if the referenced web site exposes such a feature, or you have to resort to web scaraping, loading all the required web pages, parsing them some way, and finally write your collected data to your db... but SQL Server can not do that by it self.. you have to do it "your way"...

    regards


    http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools http://www.hotelsole.com/

    • Marked as answer by ryguy72 Monday, July 16, 2012 11:02 PM
    Monday, July 16, 2012 10:01 PM
  • Ah!  This is very valuable information.  I have Excel-VBA code that pulls in historical stock data; it works quite well.  I guess I can just get the data into Excel, and then 'write' everything to a SQL Server Table.  I was just wondering if there was a better way to do it.  Maybe something more direct, just so I could eliminate the Excel part.  Well, thanks for clearing this up for me.

    Kind regards.


    Ryan Shuell

    Monday, July 16, 2012 11:02 PM