Rake Task insert record from MySqlDB to SqlServerDB


Anyone can help, to my script see the list below. I want to insert from
MySqlDB to SqlServerDB. Currently, my script will insert the entire data
but I need to truncate the table first from SqlServerDB on ISQL command
line manually.

Is there a way directly to insert the data without truncating the table
mytalbes on SqlServerDB?

# Start Here
# rake utils:staging
n# rake utils:staging
namespace :utils do
  task :staging => :environment do
    FileList.new('app/**/*') { |list|
      translations = []
      list.each { |file_path|
        unless File::directory?(file_path)
          file = File.open(file_path, 'r')
          file.each { |line|
            translations = translations |
        # MySqlDB Unix getting the data here
        mytables = Mytable.find :all

        # SqlServerDB Windows insert the data not existing on MysqlDB
        mytables.each { |mytable| Mytable.create mytable.attributes }
# End Here

Thanks in Advance!