similar to: MySQL Where conditions automatic formatting

Displaying 20 results from an estimated 10000 matches similar to: "MySQL Where conditions automatic formatting"

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
2017 Nov 03
1
Maria 10 breaks unixodbc mysql connector
I think the solution may exist. The compatibility of mysql-connector-odbc with maria may just means the driver can access the mariadb - but my experience suggests not live on the same host. maria has its own connector: https://downloads.mariadb.org/connector-odbc/ it does not look like this is in the sig, so I'll have to turn to the maria repo. I'll try replacing the driver first, then
2008 Jan 07
1
extension.conf with mysql
Hi, I am trying to connect the outbound dialing with mysql with the following code, exten => 88,1,MYSQL(Connect connid hostname username password dbname) exten => 88,2,GotoIf($["${connid}" = ""]?error,1) exten => 88,3,MYSQL(Query resultid ${connid} SELECT\ phone\ FROM\ <tablename>\ WHERE\ phone =${a}) exten => 88,4,MYSQL(Fetch fetchid ${resultid} ph\ sa)
2009 Aug 28
1
mysql-server-5.0.82sp1-1.el4_8 upgrade
Hi, There has been update to mysql within the centosplus repository on 26th August. Please be aware, that you might need to upgrade tables after the server upgrade. 1) run CHECK TABLE .... 2) if the response is 'Table upgrade required. Please do "REPAIR TABLE `tablename`" to fix it!' 3) do run :o) REPAIR TABLE 4) good point is again CHECK TABLE 4) good point is OPTIMIZE TABLE
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 =
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
2012 Apr 05
3
help in paste command
i have a character variable tablename="DressMaterials" var1=("red","blue","green","white") My output should be like select * from DressMaterialswhere colors in ("red","blue","green","white") i'm not able to get the where part. my code paste(select * from ", tablename , " where colors in
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 <-
2011 Jul 17
1
ODBC MySql DB: sqlQuery empty
Dear R Beginners, Experts and Users, I already asked this question on the R-sig-DB mailing list, but sadly didn't got a reply :-( . Keeping fingers crossed that I have more luck on the main R mailinglist :) . I'm trying to connect to a MySQl database via Gnu R using the RODBC interface. The conenction workes but I get an empty result string. Gnu R and the MySql DB are running on a 64 bit
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:
2012 Jun 18
4
Asterisk 1.8.13.0 / problem with cdr logging (mysql, odbc)
Hi, I am trying now for over 4 hours setting up cdr-logging via odbc into a mysql database. But with no success. Do you have any hint for me? cat /etc/odbc.ini ------------------ [MySQL-asterisk] Description = MySQL ODBC Driver Driver = MySQL Socket = /var/run/mysqld/mysqld.sock Server = localhost User = xxx Password = xxx Database = asterisk Option = 3 Port = and /etc/odbcinst.ini
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