aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/mlpdb.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/mlpdb.R b/R/mlpdb.R
index c77d7c12..e86a7674 100644
--- a/R/mlpdb.R
+++ b/R/mlpdb.R
@@ -74,7 +74,7 @@ get.tranchequotes <- function(indexname, tenor='5yr', date=Sys.Date()){
distinct.quotes <- dbGetQuery(mlpdbCon, sprintf(sqlstr, temp$index, temp$series, date, tenor))
flag <- FALSE
##we loop through the disctinct quotes until we find a complete set
- for(i in seq_along(distinct.quotes)){
+ for(i in 1:nrow(distinct.quotes)){
sqlstr <- paste("select * from tranche_quotes where index='%s'",
"and series=%s and tenor = '%s' and quotedate='%s'",
"and detach-attach!=5 and quotesource='%s' order by attach asc")