Displaying 1 result from an estimated 1 matches for "primekeys".
Did you mean:
primekey
2010 Aug 13
0
some helpful tips on using RODBC
...bCon <- odbcConnect(db)
tmp <- sqlColumns(dbCon, dbTable)
varTypes <- as.character(tmp$TYPE_NAME)
names(varTypes) <- as.character(tmp$COLUMN_NAME)
if (!is.null(primeKey)) {
myQuery <- paste("Select max(",primeKey,") from ",dbTable)
primeKeys <- seq(1,dim(dataSet)[1]) + sqlQuery(dbCon, myQuery)[1,1]
dataSet <- cbind(primeKeys,dataSet) ; names(dataSet)[1] <- primeKey
} ## end if clause to create prime Key
if (check.names) {
if (length(setdiff(names(dataSet),names(varTypes)))!=0) {
message(past...