aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/intex_deal_functions.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/intex_deal_functions.R b/R/intex_deal_functions.R
index e03706e1..5ccf5455 100644
--- a/R/intex_deal_functions.R
+++ b/R/intex_deal_functions.R
@@ -54,7 +54,7 @@ cusip.data <- function(workdate = Sys.Date()){
sqlstring <- "SELECT DISTINCT ON (cusip) cusip, maturity, coupon AS grosscoupon,
spread, CASE WHEN floater_index like 'LIBOR%' THEN 'FLOAT' ELSE 'FIXED' END
AS fixedorfloat, orig_moody FROM cusip_universe JOIN deal_indicative USING (dealname)
-WHERE updatedate<=$1 ORDER BY cusip, updatedate"
+WHERE updatedate<=$1 ORDER BY cusip, updatedate DESC"
data <- dbGetQuery(etdb, sqlstring, workdate)
data <- data.table(data)
setkey(data, "cusip")