Skip to content

Instantly share code, notes, and snippets.

@renatocantarino
Created July 22, 2013 20:10
Show Gist options
  • Save renatocantarino/6057199 to your computer and use it in GitHub Desktop.
Save renatocantarino/6057199 to your computer and use it in GitHub Desktop.
SQL com R
library(RODBC)
cn<-odbcConnect('NW',uid='renato',pwd='senha')
sql <- "select top 30 ShipName from dbo.Orders"
myresult<- (sqlQuery(cn, sql))
odbcClose(cn)
print(myresult)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment