aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/load_cds_data.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/load_cds_data.R b/R/load_cds_data.R
index ff41b6bd..7c9590ff 100644
--- a/R/load_cds_data.R
+++ b/R/load_cds_data.R
@@ -2,7 +2,7 @@ library(Rbbg)
source("mlpdb.R")
download.cdscurves <- function(date=Sys.Date()){
- tickers <- dbGetQuery(dbCon, "select cds_curve[6] from CDS_Issuers")$cds_curve
+ tickers <- dbGetQuery(mlpdbCon, "select cds_curve[6] from CDS_Issuers")$cds_curve
bbg.data <- bds(bbgConn, paste(tickers, "Curncy"), "cds_curve_info")
stmt <- "INSERT INTO cds_quotes VALUES('%s', '%s', 0, 0, %s, %s, %s, %s)"
for(i in 1:nrow(bbg.data)){
@@ -12,7 +12,7 @@ download.cdscurves <- function(date=Sys.Date()){
}else{
Source <- paste0("'", Source, "'")
}
- dbSendQuery(dbCon, sprintf(stmt, format(date,"%m/%d/%y"),
+ dbSendQuery(mlpdbCon, sprintf(stmt, format(date,"%m/%d/%y"),
bbg.data[i,2], bbg.data[i,4], bbg.data[i,5],
Source, bbg.data[i,6]))
}