aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/et_tables.sql5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/et_tables.sql b/sql/et_tables.sql
index e1d6686c..172d348a 100644
--- a/sql/et_tables.sql
+++ b/sql/et_tables.sql
@@ -346,8 +346,7 @@ CREATE OR REPLACE FUNCTION et_aggdealinfo (p_dealname varchar(10))
bool_or(c.secondlien)) AS secondlien, bool_or(a.iscdo) AS iscdo,
bool_or(a.defaultedflag) AS defaultedflag FROM et_latestdealinfo(p_dealname) a
LEFT JOIN latest_markit_prices2 b ON a.loanxid = b.loanxid
- LEFT JOIN bloomberg_corp c ON a.cusip=c.cusip WHERE a.dealname = p_dealname
- and a.ReinvFlag IS NOT TRUE
+ LEFT JOIN bloomberg_corp c ON a.cusip=c.cusip WHERE a.ReinvFlag IS NOT TRUE
GROUP BY a.issuername, a.maturity, a.loanxid, a.fixedorfloat,
a.frequency, a.cusip ORDER BY issuername;
END;
@@ -420,7 +419,7 @@ CREATE OR REPLACE FUNCTION et_aggdealinfo_historical (p_dealname varchar(10), p_
FROM et_historicaldealinfo(p_dealname, p_date) a
LEFT JOIN historical_markit_prices2(p_date) b ON a.loanxid=b.loanxid
LEFT JOIN historical_bloomberg_corp(p_date) c ON a.cusip=c.cusip
- WHERE a.dealname = p_dealname AND a.ReinvFlag IS NOT TRUE
+ WHERE a.ReinvFlag IS NOT TRUE
GROUP BY a.issuername, a.maturity, a.loanxid, a.fixedorfloat,
a.frequency, a.cusip, a.et_loanxid, a.et_cusip ORDER BY issuername;
END;