Click here to Skip to main content
15,894,180 members
Home / Discussions / C#
   

C#

 
GeneralRe: Copying table Pin
harold aptroot18-Jul-10 14:38
harold aptroot18-Jul-10 14:38 
GeneralRe: Copying table Pin
humayunlalzad18-Jul-10 17:53
humayunlalzad18-Jul-10 17:53 
AnswerRe: Copying table Pin
PIEBALDconsult18-Jul-10 15:56
mvePIEBALDconsult18-Jul-10 15:56 
AnswerRe: Copying table Pin
Abhinav S18-Jul-10 18:25
Abhinav S18-Jul-10 18:25 
GeneralRe: Copying table Pin
humayunlalzad18-Jul-10 18:42
humayunlalzad18-Jul-10 18:42 
GeneralRe: Copying table Pin
PIEBALDconsult19-Jul-10 3:17
mvePIEBALDconsult19-Jul-10 3:17 
GeneralRe: Copying table Pin
humayunlalzad19-Jul-10 12:28
humayunlalzad19-Jul-10 12:28 
GeneralRe: Copying table Pin
PIEBALDconsult19-Jul-10 15:42
mvePIEBALDconsult19-Jul-10 15:42 
A statement like SELECT * INTO JunkCopy FROM Junk.dbo.JunkName will copy a table and it contents.

To add rows thereafter, a statement like INSERT INTO JunkCopy SELECT * FROM Junk.dbo.JunkName, but probably with a WHERE CLAUSE to avoid duplicates, should do the trick.

But these will only work when the databases are on the same server or in linked servers.



I have also had to copy tables among different database systems with code similar to (but infinitely better than Big Grin | :-D ) the code you posted.
GeneralRe: Copying table Pin
humayunlalzad24-Jul-10 5:47
humayunlalzad24-Jul-10 5:47 
GeneralRe: Copying table Pin
PIEBALDconsult24-Jul-10 5:49
mvePIEBALDconsult24-Jul-10 5:49 
QuestionXml validation in c# Pin
kunthavai18-Jul-10 13:16
kunthavai18-Jul-10 13:16 
AnswerRe: Xml validation in c# Pin
Eslam Afifi18-Jul-10 13:37
Eslam Afifi18-Jul-10 13:37 
GeneralRe: Xml validation in c# Pin
kunthavai19-Jul-10 4:29
kunthavai19-Jul-10 4:29 
Questionsearch in document's.. Pin
noamtzu0018-Jul-10 10:30
noamtzu0018-Jul-10 10:30 
AnswerRe: search in document's.. Pin
venomation18-Jul-10 11:30
venomation18-Jul-10 11:30 
AnswerRe: search in document's.. Pin
Pete O'Hanlon18-Jul-10 23:09
mvePete O'Hanlon18-Jul-10 23:09 
QuestionA question about abstraction... Pin
venomation18-Jul-10 8:10
venomation18-Jul-10 8:10 
AnswerRe: A question about abstraction... Pin
Luc Pattyn18-Jul-10 8:43
sitebuilderLuc Pattyn18-Jul-10 8:43 
GeneralRe: A question about abstraction... Pin
venomation18-Jul-10 9:00
venomation18-Jul-10 9:00 
QuestionGetting "Input array is longer than the number of columns in this table." Pin
Kevin Marois18-Jul-10 7:33
professionalKevin Marois18-Jul-10 7:33 
AnswerRe: Getting "Input array is longer than the number of columns in this table." Pin
Luc Pattyn18-Jul-10 8:02
sitebuilderLuc Pattyn18-Jul-10 8:02 
GeneralRe: Getting "Input array is longer than the number of columns in this table." Pin
Kevin Marois18-Jul-10 8:36
professionalKevin Marois18-Jul-10 8:36 
AnswerRe: Getting "Input array is longer than the number of columns in this table." PinPopular
Rob Graham18-Jul-10 8:19
Rob Graham18-Jul-10 8:19 
Questionhelp: deploy c# windows application with sql server database Pin
pradeepwithu18-Jul-10 6:56
pradeepwithu18-Jul-10 6:56 
AnswerRe: help: deploy c# windows application with sql server database [modified] Pin
I Believe In GOD18-Jul-10 11:32
I Believe In GOD18-Jul-10 11:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.