Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:650040
1 2 3 4 5
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
Something went wrong with that request. Please try again.