projects
/
migration-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
da5ac37
)
let migration_tools.attempt_money strip dollar signs for us
author
Jason Etheridge
<jason@esilibrary.com>
Wed, 14 Jan 2015 21:51:42 +0000 (21:51 +0000)
committer
Jason Etheridge
<jason@esilibrary.com>
Wed, 14 Jan 2015 21:51:42 +0000 (21:51 +0000)
sql/base/base.sql
patch
|
blob
|
history
diff --git
a/sql/base/base.sql
b/sql/base/base.sql
index
c478f4b
..
610b741
100644
(file)
--- a/
sql/base/base.sql
+++ b/
sql/base/base.sql
@@
-688,7
+688,7
@@
CREATE OR REPLACE FUNCTION migration_tools.attempt_money (TEXT,TEXT) RETURNS NUM
output NUMERIC(8,2);
BEGIN
FOR output IN
- EXECUTE 'SELECT ' || quote_literal(attempt_value) || '::NUMERIC(8,2) AS a;'
+ EXECUTE 'SELECT ' || quote_literal(REPLACE(attempt_value,'$','')) || '::NUMERIC(8,2) AS a;'
LOOP
RETURN output;
END LOOP;