In Sqlbase if I want to transfer data from one location to another I do:
CREATE VIEW X AS SELECT * FROM table WHERE ...;
UNLOAD SQL X.SQL X;
and in another database:
LOAD SQL X.SQL;
Simple. Can someone advise me how to do the same in MS SqlServer?
Transfer data is SqlServer
Re: Transfer data is SqlServer
In SqlServer you can address 2 dabases in a single select.
For example:
This inserts into database TEST into table Test into Column col1 the values from database PROD from table Customer and column Name.
Regards,
Rainer
For example:
Code: Select all
insert into [Test].[dbo].[Test] (col1)
select Name from [PROD].[dbo].[Customer]
Regards,
Rainer
Re: Transfer data is SqlServer
Actually, one database is at a remote location and I usually mail the commands to that guy who runs it & sends me the file. Looking for something similar.
Re: Transfer data is SqlServer
Hi Feroz,
don't know, if there is a thing like 'Unload'.
But what about:
At your side you can create the Table 'NewTable' and run all those insert statements.
And there seems to be a tool called bcp to transfer data from one Sql Server to another.
Regars,
Rainer
don't know, if there is a thing like 'Unload'.
But what about:
Code: Select all
create view Test as select Name from Agent
select 'insert into NewTable (NewCol) values ' + Name from test
And there seems to be a tool called bcp to transfer data from one Sql Server to another.
Regars,
Rainer
Re: Transfer data is SqlServer
Thanks, I checked out bcp and it seems to be the real thing.
Who is online
Users browsing this forum: [Ccbot] and 0 guests