aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/quantifi.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/quantifi.sql b/sql/quantifi.sql
index 98e0fcae..215e7418 100644
--- a/sql/quantifi.sql
+++ b/sql/quantifi.sql
@@ -323,10 +323,10 @@ CREATE TABLE swaptions (
CREATE USER MAPPING FOR quantifi_user SERVER dawndb_server OPTIONS (user 'dawn_user', password '****');
CREATE OR REPLACE FUNCTION list_unterminated_tranche(p_date DATE)
-RETURNS TABLE(tradeid text, productname TEXT, most_recent_tradedate DATE, currentnotional text) AS $$
+RETURNS TABLE(tradeid text, productname TEXT, most_recent_tradedate DATE, currentnotional integer) AS $$
BEGIN
RETURN QUERY
- SELECT t.tradeid, t.productname, m.most_recent_tradedate, t.currentnotional::text
+ SELECT t.tradeid, t.productname, m.most_recent_tradedate, t.currentnotional::integer
FROM cdxtrancheut t
JOIN (
SELECT c.productname, MAX(c.tradedate) as most_recent_tradedate