Permalink
Browse files

fix postgresql specific inserts

  • Loading branch information...
1 parent 6bcca11 commit e8431f71dfb4430a1be93066799d3972133096d8 @grobie committed Oct 8, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 clean.rb
  2. +1 −1 detector.rb
View
@@ -1,7 +1,7 @@
class Clean
def self.insert(values)
- query = 'INSERT INTO "kunden" ("origid","origtable","anrede","titel","vorname","mittelname","nachname","strasse","hausnummervon","hausnummerbis","postfach","postleitzahl","ort","ortzusatz","vorwahl","telefonnummer","geburtsdatum") VALUES (' + values.join('),(') + ")\n\n"
+ query = 'INSERT INTO kunden (origid,origtable,anrede,titel,vorname,mittelname,nachname,strasse,hausnummervon,hausnummerbis,postfach,postleitzahl,ort,ortzusatz,vorwahl,telefonnummer,geburtsdatum) VALUES (' + values.join('),(') + ')'
ActiveRecord::Base.connection.execute(query)
end
View
@@ -21,7 +21,7 @@ def output(results)
end
if @save
- query = 'INSERT INTO "matches" ("kunde1_id","kunde2_id","key","distance") VALUES (' + values.join('),(') + ")\n\n"
+ query = 'INSERT INTO matches (kunde1_id,kunde2_id,key,distance) VALUES (' + values.join('),(') + ')'
ActiveRecord::Base.connection.execute(query)
end
end

0 comments on commit e8431f7

Please sign in to comment.