similar to: sqlFetch works but sqlQuery doesn't

Displaying 20 results from an estimated 2000 matches similar to: "sqlFetch works but sqlQuery doesn't"

2013 Apr 03
1
sqlSave writes, but only for sqlFetch
I've been having some issues with sqlSave, and I think I've found an clue that may identify the problem. In the code at http://pastebin.com/vTAKt4bL<http://pastebin.com/W6UGKep9>, I connect to a Netezza instance, make a simple table, and query it. Despite sqlSave succeeding without error, sqlQuery tells me the table doesn't exist. Also, when I query the database outside of R, I
2018 Jan 24
1
Help with SQLsave
Hi all, I'm using RODBC library to connect to a database. I'm trying to read a table from a database and after manipulating it would like to write to the same database but with a different table P<-data.frame(sqlQuery(myconn,'select? *? from Demographics')) sqlSave(myconn,p,tablename="trial",rownames=FALSE) I'm gettng this error Version:1.0
2007 Jan 16
1
RODBC: sqlQuery is successful, but a similar sqlFetch returns error
Greetings guRus -- I have successfully queried a large (24,445 rows by 281 cols.) in-house database using the following RODBC query (without the line breaks) testout <- sqlQuery(channel, "select idSchedule,EXCL_Total from dbo.vwC1198_2006_RawData_With_CMPL_EXCL") This returns a dataframe of 24445 rows and two columns (as intended), but the following command testout
2009 May 21
1
Error in importing table from SQL to R
Hi Friends, I am trying to import a table from SQL server to R(2.9.0), however i am getting errors while running the below codes. Can anyone identify and let me know where did i go wrong??? Thanks in anticipation :) library(RODBC) myconn <- odbcConnect("RDATABASE") myconn RODB Connection 6 Details: case=nochange DSN=RDATABASE Description=Database for R UID=Madana_Babu
2013 Nov 25
0
Fetching data from MySQL via odbcConnect - Error in as.POSIXlt.character(x, tz, ...) :
Hi! I am trying to retrieve data from a MySQL Database using RODBC with the commands odbcConnect and sqlFetch. There are different data files in the database and in some cases it works without any difficulties. Nevertheless I get an error with some data files. Since I'm not familiar with MySQL I hope to get some ideas here. My code looks as follows: myconn
2009 Jan 26
2
R crashes when using the RODBC Package
Hi, I've written some code that fetches data from an Access Database (2003), processes the data, then saves the modified data back into a table in the Access database. It works if I only pass through the code once, but if I put a loop around the code so that I fetch data from a different source table, and then save it again to a different destination table, the code crashes. It is
2007 Mar 07
0
sqlSave help!
Hi Everyone, I'm so confused. I've been trying to save data to a table but I keep getting an error that says the table does not exist and at other times saying that it does. So here are some statements: > sqlQuery(channel, "select top 1 * from > TestDB.[SILICON\\holouis1].clep_tier_shift") State NB Change_Number 1 IL 2005-02-08 7 It exists and I
2006 Jan 17
0
RODBC sqlQuery question
Why does this happen when I do a sqlQuery? > sessionInfo() Version 2.3.0 Under development (unstable) (2006-01-04 r36984) powerpc-apple-darwin8.3.0 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base" other attached packages: RODBC "1.1-5" > b
2011 Mar 01
0
odbcConnectExcel2007 creates corrupted files
I tried creating a .xlsx file using odbcConnectExcel2007 and adding a worksheet with sqlSave. This seems to work, I am even able to query the worksheet, but when I try opening the file in Excel I get the following message: "Excel cannot open the file 'test.xlx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file
2012 Feb 06
0
sqsSave() test using Test.R script returning error suggesting no values upon "insert"
Hi. I attempted to use RODBC and decided to execute all the tests provided in "Test.r" under the unpacked package RODBC folder. Beginning with the following: library(RODBC) library(MASS) USArrests[1,2] <- NA hills <- hills[1:15,] row.names(hills)[12] <- "Dollar ('$')" set.seed(1) # MySQL ## testdb3 is ODBC/Connector 3.51.x, testdb5 is 5.1.x channel <-
2002 Jul 18
2
RODBC and Excel Files
Hello, I am trying to play with RODBC library and Excel Files. In my file (doubs.xls) there are 2 spreadsheets: > library(RODBC) > connection<-odbcConnect("Excel Files") > sqlTables(connection) TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 1 F:\\Th?se\\R\\Doubs NA Faune$ SYSTEM TABLE NA 2 F:\\Th?se\\R\\Doubs NA Milieu$
2010 Nov 25
1
RODBC
Hi, I am running the RODBC examples form the help guide. I am trying to UPDATE a table in an Access data base but I am having an error. library(RODBC) library(termstrc) path = getwd() setwd(getwd()) dbName = "data.mdb" pathdbname = paste(path,"/",dbName,sep="") accesChannel = odbcConnectAccess(pathdbname, uid = "", pwd = "")
2006 Oct 18
2
sqlSave, fast=F option, bug?
Hi, Using the fast=F option, sqlSave saves without matching column names. It looks like a bug to me.......... Here's a simple (artificial) example. ----------------------------------------- Create a dataframe and save it to a database table "test" as follows: df <- data.frame(T=1, S=10) sqlSave(channel, df, "test", rownames=F) The table now looks like T S 1 10 If
2008 May 05
2
RODBC and schemas
I have found that the "schema.table" syntax used in Postgresql (and Oracle) does not work directly with RODBC. This works library(RODBC) con<-odbcConnect("mydb") d<-sqlQuery(con,"select * from meso.trees") However this does not. d<-sqlFetch(con,"meso.trees") Error in odbcTableExists(channel, sqtable) : ?meso.trees?: table not found on channel
2010 Feb 11
0
sqlSave data into multiple *.mdb files
Hi All, con <- member <- class <- list() for(i in 1:5) { con[[i]] <- odbcConnectAccess(paste("C:/Desktop/Data/source",i,".mdb",sep = '')) #read data from Access files member[[i]] <- sqlFetch(con[[i]],'member') #get table data from *.mdb files observe[[i]] <- sqlFetch(con[[i]],'observe') #get table data from *.mdb
2002 Aug 28
1
RODBC: sqlFetch and its argument sqtable
Calling function "sqlFetch" in library(RODBC) and specifying a character string as 2nd argument, I get an error I don't understand: library(RODBC) channel <- odbcConnect("mydatabase.mdb", case="msaccess") sqlFetch(channel, "mytable") # this works fine tabname <- "mytable"; sqlFetch(channel, tabname) # this gives an error: # Error in
2004 Nov 09
1
colnames argument in sqlFetch backwards? (PR#7355)
Full_Name: Bert Gunter Version: 2.0.0 patched OS: Win2000 Submission from: (NULL) (192.12.78.250) The TRUE/FALSE options of the colnames argument in sqlFetch (RODBC) seem to be reversed, at least for .xls files. ## z is a connection to an xls workbook opened by odbcConnectExcel() > dat<-sqlFetch(z,'SuccessRates',colnames=FALSE) > dat[1:5,] RecID Name Run Grams Lost Run
2004 Nov 09
1
RODBC bug or doc error in sqlFetch on xls files (PR#7354)
R 2.0.0 patched under win2000. MS Office Excel 2003. ODBC Drivers? This may not come as a surprise -- sqlFetch() (and perhaps other ?) appear not to handle table/worksheet names with spaces in them in Excel tables. I was not able to find documentation that specifically mentioned this, although the Help pages vaguely hinted that there might be difficulty with Excel's "peculiar
2012 Oct 30
1
sqlFetch doesn't read the whole objects.
Hi everyone, I connected a data in FileMaker server with odbcConnect. When I call the data "CANCERS" using sqlFetch, it looks okay. However, the number of obs was different with the actual number. If I read the same data from Microsoft Access, there are 656 obs. in it but srt() shows me 600 obs. Does anyone know why this happened and how to read all obs. from R? Thank you in advance.
2010 Feb 23
1
RODBC to import/export xls files
Dear R users, I've learned today about RODBC package in order to import xls file to dataframes and export the dataframes to xls files. However I have some problems. Please excuse me if these are basic but as I said, I've just begun with this package. Also this email is quite long, but everything is related, so I don't think it would be better to split it. Moreover, there's a