RODBC的架包
訪問鏈接:
鏈接:https://pan.baidu.com/s/198jNihqVFsbTX_TfZ0d2mg
提取碼:bg00
複製這段內容後打開百度網盤手機App,操作更方便哦
連接語句
install.packages("RODBC")
library(RODBC)
dbhandle <- odbcDriverConnect('driver={SQL Server};server=(10.113.121.***);database=tingnan-BMPS;trusted_connection=true')
res <- sqlQuery(dbhandle, 'select * from Area')
odbcClose(dbhandle)
print(res)