Created
March 6, 2013 10:31
-
-
Save t11a/5098403 to your computer and use it in GitHub Desktop.
This file contains 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
sql = "LOAD DATA LOCAL INFILE '#{csv_file}' INTO TABLE tblname FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'" | |
ActiveRecord::Base.connection.execute(sql) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment