Created
October 27, 2010 21:22
-
-
Save adamgamble/650040 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert_sql << "INSERT INTO negative_balance_reports (bank, agent, store_number, name, ssn, pan, overdraft, their_balance, our_balance, overdraft_limit, account_type) VALUES " | |
@rows.each do |row| | |
insert_sql << "('#{@bank}', '#{row[0]}', '#{row[1]}', '#{row[2].gsub("'","''")}', '#{row[3]}', '#{row[4]}', '#{row[5]}', '#{row[6]}', '#{row[7]}', '#{row[8] == "N/A" ? 0 : row[8]}', '#{row[9]}')," | |
end | |
NegativeBalanceReport.connection.execute(insert_sql.string.chop + ";") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment