我正在尝试从在R Studio上运行SQL查询的wrds下载数据。但是,我总是遇到同样的错误。
我正在尝试仅下载运输公司的数据(NSDINX代码6),但收到错误消息。选择纳斯达克指数(HEXCD = 3)时没有发生
res <- dbSendQuery(wrds, "select CUSIP, DATE, PERMNO, PERMCO, PRC, RET, RETX, VOL, HEXCD, NSDINX from CRSP.DSF WHERE DATE >= '2000-03-01' AND DATE < '2018-04-01' AND NSDINX = 6 AND HEXCD = 3")
Error in result_create(conn@ptr, statement) :
Failed to prepare query: ERROR: column "nsdinx" does not exist
LINE 1: ...IP, DATE, PERMNO, PERMCO, PRC, RET, RETX, VOL, HEXCD, NSDINX