From 581677574fc105e338fd07b1fd94c30ce6ff0da7 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 12 Nov 2014 15:34:43 +0100 Subject: [PATCH] COLLATE in sqlite3 --- src/{EMS_utility.py => EMSL_utility.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/{EMS_utility.py => EMSL_utility.py} (98%) diff --git a/src/EMS_utility.py b/src/EMSL_utility.py similarity index 98% rename from src/EMS_utility.py rename to src/EMSL_utility.py index e7d5f51..007286f 100755 --- a/src/EMS_utility.py +++ b/src/EMSL_utility.py @@ -156,7 +156,7 @@ class EMSL_local: conn = sqlite3.connect(self.db_path) c = conn.cursor() - c.execute("SELECT DISTINCT elt from all_value WHERE name=:name_us", + c.execute("SELECT DISTINCT elt from all_value WHERE name=:name_us COLLATE NOCASE", {"name_us": basis_name}) data = c.fetchall() @@ -174,7 +174,7 @@ class EMSL_local: d = [] for elt in elts: - c.execute("SELECT DISTINCT data from all_value WHERE name=:name_cur AND elt=:elt_cur", + c.execute("SELECT DISTINCT data from all_value WHERE name=:name_cur COLLATE NOCASE AND elt=:elt_cur COLLATE NOCASE", {"name_cur": basis_name, "elt_cur": elt})