Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2012-12-12 : 04:02:44
|
hello all,i need to retrive exact data basing on date from users table.I have 10 lakhs records in which i need to pick up only 2 lakh records which inserted on Nov 30 2012 by using this query i got the recordsselect * from patients where convert(date,CreatedDate) = '2012-11-30' order by 1 desc but how can i get the these 2 lakh records and move into another server...with in 10 lakhs i need only 2 lakhs and i need to move to another serverP.V.P.MOhan |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-12-12 : 04:24:49
|
Case1:First of all, you need to connect to Server B.Once connected, you need to link Server A to Server B. In SQL Mngmt Studio , this can be done by right-clicking Linked Servers under the Server Objects field and adding the new linked server.Then you need to run a query similar to the one below.INSERT INTO ServerB.DatabaseName.dbo.TableName(SELECT * FROM ServerA.DatabaseName.dbo.TableName)Where ServerA is the server name of Server A, similar for ServerB and DatabaseName is the name of the databases on each serverCase2: By using Import/Export wizard (If you have difficulty with linked server)First insert your required data into another tableAnd then use this table with Import/export wizard--Chandu |
|
|
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2012-12-12 : 05:01:37
|
exactly case 2 i have did chandu thanks a Ton !!!P.V.P.MOhan |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-12-12 : 05:27:23
|
quote: Originally posted by mohan123 exactly case 2 i have did chandu thanks a Ton !!!P.V.P.MOhan
Welcome--Chandu |
|
|
|
|
|