Groups | Blog | Home
all groups > sql server new users > november 2006 >

sql server new users : copy view as table to new server



Matt Williamson
11/15/2006 2:05:46 PM
I need to copy a view from one server to a local MSDE instance on my
computer as a table. I've created the table but I'm not sure what the
best way to copy the data returned from querying the view would be.
Currently to run a query against that view on the server it is on, it
takes about 30-40 mins which is why I'm copying it to my machine once so
I can run some queries against it a little faster. The older server is
running MS SQL7 sp4 and the MSDE on my machine is 8.00.2039 in case it
matters. I can post DDL if it will help, I'm just not sure it's of any
use at this point.

TIA

Matt

--
Posted via a free Usenet account from http://www.teranews.com
Dejan Sarka
11/19/2006 12:00:00 AM
[quoted text, click to view]

You can use
Insert Into your_local_table Select col_list From your_view
on your local MSDE. This would be a distributed query, so you would need the
Openrowset function or linked server + Openquery function to access the
view. It would be nice if you coul identify only new & updated rows, so you
could transfer only those. You could use a DTS package instead, if you are
not familiar with T-SQL syntax.

--
Dejan Sarka
http://www.solidqualitylearning.com/blogs/

AddThis Social Bookmark Button