projects
/
migration-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
95f8104
)
removing bracketed text
author
Rogan Hamby
<rhamby@equinoxinitiative.org>
Fri, 7 Feb 2020 16:18:36 +0000 (11:18 -0500)
committer
Rogan Hamby
<rhamby@equinoxinitiative.org>
Fri, 7 Feb 2020 16:18:36 +0000 (11:18 -0500)
sql/koha/general_functions.sql
patch
|
blob
|
history
diff --git
a/sql/koha/general_functions.sql
b/sql/koha/general_functions.sql
index
6998171
..
22ea79b
100644
(file)
--- a/
sql/koha/general_functions.sql
+++ b/
sql/koha/general_functions.sql
@@
-29,3
+29,17
@@
CREATE FUNCTION
END
$
DELIMITER ;
+
+DROP FUNCTION IF EXISTS remove_bracketed_text;
+DELIMITER $
+CREATE FUNCTION
+ remove_bracketed_text(str TEXT)
+ RETURNS TEXT
+ DETERMINISTIC
+ BEGIN
+ RETURN REPLACE(str, SUBSTRING(str, LOCATE('(', str), LENGTH(str) - LOCATE(')', REVERSE(str)) - LOCATE('(', str) + 2), '');
+ END
+$
+DELIMITER ;
+
+