title: Programmatically copying data across tables in different sql server databases having different schemas
body: <p>I am trying to build a system which takes in snapshot of a few related tables in a SQL Server database, attaches a date-time element to it and is stored in a different database. Hence the new database contains snapshots of data at different date-times (leading to different schemas).  </p>
  
  <p>I have already got it working using t-sql on Sql Server Management Studio. Can I write a query in C# and execute it between the two databases? I read about ADO.NET but couldn't find a way of establishing two SQLconnections and then executing query for the transfer.  </p>
  
  <p>Are there more efficient ways to do this? I am using Microsoft SQL Server 2012.</p>