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 |
|
getur.srikanth@gmail.com
Yak Posting Veteran
77 Posts |
Posted - 2008-01-30 : 11:19:13
|
| I have to move data from one table (it is in different database) to my local database. the data available in the table [dbo].[EmailNotification] from SKINID database move data to [dbo].[EmailNotification] SKINID_DEV databaseThanks in advance |
|
|
singularity
Posting Yak Master
153 Posts |
Posted - 2008-01-30 : 11:43:20
|
| insert into SKINID_DEV.dbo.EmailNotificationselect * from SKINID.dbo.EmailNotification |
 |
|
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-01-30 : 11:43:48
|
| If the databases are on the same server:SELECT * INTO SKINID_DEV.dbo.EmailNotification FROM SKINID.dbo.EmailNotification If the databases are on different servers you will need to search bol for "Linked Server". Once you have the 2 servers linked a variation of the above script should work. |
 |
|
|
getur.srikanth@gmail.com
Yak Posting Veteran
77 Posts |
Posted - 2008-01-30 : 12:05:21
|
| In my case SKINID.dbo.EmailNotification columns not equal to SKINID_DEV.dbo.EmailNotification.Because I added some new columns in SKINID_DEV.dbo.EmailNotification (my local database table). I am getting error "Insert Error: Column name or number of supplied values does not match table definition."Now I need only that columns data that exists in both table. |
 |
|
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-01-30 : 12:30:53
|
quote: Originally posted by getur.srikanth@gmail.com In my case SKINID.dbo.EmailNotification columns not equal to SKINID_DEV.dbo.EmailNotification.Because I added some new columns in SKINID_DEV.dbo.EmailNotification (my local database table). I am getting error "Insert Error: Column name or number of supplied values does not match table definition."Now I need only that columns data that exists in both table.
Looks like your on your way.INSERT SKINID_DEV.dbo.EmailNotification ( column1, column2 )SELECT column1, column2FROM SKINID.dbo.EmailNotification |
 |
|
|
|
|
|