Author |
Topic |
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2009-02-12 : 06:16:46
|
how can i loop through a table on another serverand get data from there?thanks in advancePelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2009-02-12 : 06:48:14
|
Why do you want to loop through a table?Does that have something to do with getting the data?What type of server?Can you create a linked server?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-12 : 07:54:00
|
Use Export/Import Wizard or SSIS. |
|
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2009-02-12 : 07:54:01
|
the server that i have is sql2008, and i need to get the data from each row that is in sql2000, and insert the data to the sql2008 with soome changes.thnakspelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-12 : 09:38:51
|
quote: Originally posted by pelegk2 the server that i have is sql2008, and i need to get the data from each row that is in sql2000, and insert the data to the sql2008 with soome changes.thnakspelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
you can either use ssis package with transformation tasks in between to achieve this or add one server as a linked server to another and use four part naming convention to get data from one onto other if transformation are not too complex. what excatly are changes you want to make in the data? |
|
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2009-02-12 : 10:49:43
|
i want to take the data and create and send an xml to an existing Stored proceudre which i cant currently change the values it reciveIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-12 : 10:58:19
|
for that isnt it enough to use query using FOR XML in execute sql task to build xml and then pass it to your stored procedure by means of variable? |
|
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2009-02-12 : 11:15:26
|
how do i configure the "Linked server" option? do you maybe have an article with step by step for it?Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
|
mdubey
Posting Yak Master
133 Posts |
Posted - 2009-02-12 : 11:34:51
|
Great question how to setup linked server. Here is some steps.1) Open SQL Management Studio (SSMS)2) Go to Server Object and expand, You can see Linked server (Main Tab(3) Right Click on Linked Server and click on <New Linked Server>4) Mention Linked server name and select data source. (Either SQL or Oledb provider).5) Under Security Tab you can add login for linked server. And you are done with linked server configuration.You can use sp_addlinkedserver SP's. If need to remove the linked server use sp_removelinkedserver SP.ManojMCP, MCTS |
|
|
|