library("RODBC") conn <- odbcConnect("36",uid="dbid", pwd="password") data <- sqlQuery(conn, " select accountkey , sum(saleamt) amt , log(sum(saleamt)) log_amt from cji_eis.PubSales.Fact_Sales where datekey between 20100601 and 20100630 and gamekey = 20 group by accountkey ") hist(data$log_amt)
library("RODBC") conn <- odbcConnect("36",uid="dbid", pwd="password") . . . . #x_data 一危壱 sqlSave(conn,x_data,tablename="dbo.result")