similar to: help in paste command

Displaying 20 results from an estimated 1000 matches similar to: "help in paste command"

2011 Jul 27
1
Referencing a column using a function argument
Hi all, I've been having trouble with something that seems like it should be fairly straight forward. Any help at all from more experienced users is appreciated! I'd like to write a function that uses a column name as an argument. However, I run into problems when I try to reference this column within the function. For example, findCutoff <- function(tableName, columnName) {
2000 Mar 08
2
possible BUG with as.data.frame() and/or [.data.frame
Here is a possible BUG with as.data.frame() and/or [.data.frame which broke Michael Lapsleys RODBC-Code. Can anyone confirm it is a bug or a 'feature' of the prototype? tablename <- "abc" a <- as.data.frame(cbind("abc", 1:3)) b <- as.data.frame(cbind(tablename, 1:3)) # ok > a V1 V2 1 abc 1 2 abc 2 3 abc 3 # missing column name > b tablename 1
2012 Jun 18
4
Problem with exists? method
Hi, I have a DB with table TABLENAME, column COLUMN and an active resource client trying to connect to the DB. When i do Tablename.find(:all) => i get all the entries from the table But Tablename.exists?(:column => value) always returns false I verified that the above command works from rails console. Dont understand why it always returns false even when there are valid records. And in
2007 Mar 23
6
Updating a worksheet in Excel file using RODBC
Hello! I have no problem reading Excel files (each worksheet in the file is a "table" which can be read - at least in my case). What I would like to do is to read such a table, change it (just the contents, not the format) and write it back, and this I can not do. I am getting the following error messages (3 slightly different attempts): > sqlSave(con, x, tablename =
2007 Jun 26
2
MySQL Where conditions automatic formatting
Hi, I''m having a problem with the automatic formatting of my mysql query. My code is this: Tablename.find(:all, :conditions => {:id => list}) Where list is a list of id''s (8,9,10) The problem is that the query is automatically formatted to this: SELECT * FROM Tablename WHERE (id in (''8,7,9'')) I need this query to run without the extra single quotes
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
2004 May 10
3
sqlSave with underscores in table fieldname
Hi group, I try to write a frame to a table (RODBC). I use colnames(temp6) <- c("ind_id","ser_id","period_id","year","calc","mean") sqlSave(channel, temp6, tablename = "series_indices_test",append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -999999, fast = FALSE) This is giving me an error: Error in
2012 May 29
1
RODBC, Excel, and data truncation when writing
Hi, I am hoping to use the RODBC package to write a dataframe to an Excel .xlsx file. The dataframe contains at least one field with character elements that exceed 255 bytes, which appears to be the cell width limit in Excel. Below is example code and the warning message received: library(RODBC) d <-
2009 May 29
1
RODBC sqlSave with DB2
I am running R version 2.8.1 on Windows XP OS. This works fine. (Data.frame dta is created with records from the DB2 table.): sql <- "select * from storage.testappend_slt order by uut" dta <- sqlQuery(channel,sql) But when I try to append records (from data.frame newdta) to the same DB2 table. I get an error: sqlSave(channel, newdta, tablename = storage.testappend_slt, append
2009 Aug 18
1
Specify Database location from R
Hello Everyone, I'm trying to write a table to a specific location in my database from R. When I use the following code, it is going directly into the first part of the server which is named 'master' I want to put it onto a different part of the server called 'HRISK_1'. I think I have to change the tablename location or specify the location in the databse somehow. Could you
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI) library(RODBC) chan <- odbcConnect("MySQL51", uid="root", pwd="xxx") first <- sqlQuery(chan, "select * from example")
2005 Aug 13
1
retrieving large columns using RODBC
Hi, I have a large table in Postgresql (result of an MCMC simulation, with 1 million rows) and I would like to retrive colums (correspond to variables) using RODBC. I have a column called "index" which is used to order rows. Unfortunately, sqlQuery can't return all the values from a column at once (RODBC complains about lack of memory). So I am using the following code:
2010 Feb 11
2
SAS and RODBC
I am using R-2.10.1 binary from CRAN on a WinXP Pro system. I also use SAS v9.2 on the same box. I just started using the SAS ODBC driver that comes with version 9 of SAS. I have been able to set up an ODBC source for SAS datasets using the driver, and then with RODBC I am able to read a sample SAS dataset. > library(RODBC) > ch <- odbcConnect('sasodbc', believeNRows=FALSE)
2019 Apr 16
3
PROBLEMAS NOMBRES DE COLUMNAS CON ESPACIOS CONEXION R-SQL
Buenas tardes, Estoy tratando de realizar un update en SQL desde R: sqlUpdate(conexion1, data.frame(AUXILIAR), tablename = "AUXILIAR") y me devuelve el siguiente error: *Error in sqlUpdate(conexion1, data.frame(AUXILIAR), tablename = "AUXILIAR", : * * data frame column(s) Corteoptimo Cortediario not in database table* El problema es que sí existen esas columnas en SQL pero
2010 Feb 24
1
problem with sqlSave()
Dear R users, I've already asked this question yesterday, but, though I had answer for the other ones (and they helped a lot, thanks), for some reason didn't get an answer for this one (I would also appreciate to know why, so that I can improve the quality and clarity of my future questions). Here it is again: I'm trying to use RODBC to export dataframes to xls files. When I run
2012 May 20
4
write.xls
Hello, All: The "writeFindFn2xls" function in the "sos" package tries to write an Excel file with 3 sheets ('PackageSum2', 'findFn', 'call'). Unfortunately, it is often unable to do this because of configuration problems that are not easy to fix. I've found 3 contributed packages that provide facilities to write Excel files with
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
2006 Feb 17
3
Ajax On Rails
Hi, I want database query in rail for ''LIKE'' i.e in sql it something like. "SELECT * FROM tablename where filedname LIKE ''%keyword%'' " etc. What for rail? -- Posted via http://www.ruby-forum.com/.
2003 Apr 04
2
sqlSave() Question
All, I am new in R. I found sqlSave() doesn't work for our Oracle9i. The following was the message: > sqlSave(channel, USArrests, rownames="state") Error in sqlColumns(channel, tablename) : USArrests : table not found on channel Check case parameter in odbcConnect > sqlQuery() works OK. Please help. Thanks. -MY
2017 Apr 17
4
Error en sql UpDate
Buenos días, al querer actualizar los datos de una tabla en SQL SERVER sale el siguiente error: Error in sqlUpdate(canal_conexion, Datos, tablename = "Tabla_SQL_SERVER_Actualizar", : [RODBC] Failed exec in Update22018 0 [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification Gracias desde ya por la ayuda. -- [[alternative HTML version deleted]]