rodbc Questions
2
Solved
I am trying to connect to a PostgreSQL database using the R ODBC drivers in RStudio. For some reason, the drivers are not being detected by R:
$ Rscript -e 'odbc::odbcListDrivers()'
[1] name attri...
Purview asked 13/9, 2018 at 15:10
8
I've been trying to connect my company's DMS to R using the odbcConnect command, but get the following message:
myConn <-odbcConnect("NZSQL", uid="cejacobson", pwd="pass...
6
Solved
I'm working in an R script that uses a long SQL string, and I would like to keep the query relatively free of other markup so as to allow copying and pasting between editors and applications. I'd a...
6
Solved
I'm fighting with sqlSave to add my matrix B that looks like this:
Noinscr
88877799
45645687
23523521
45454545
to an SQL table.
so I run the following command:
sqlSave(channel, b, "[testsFelix...
Oujda asked 15/11, 2011 at 20:30
3
I have a data frame in R having 3 columns, using sqlSave I can easily create a table in an SQL database:
channel <- odbcConnect("JWPMICOMP")
sqlSave(channel, dbdata, tablename = "ManagerNav", r...
Wilone asked 23/4, 2013 at 9:13
3
Solved
I have the following simple SQL server code:
set nocount on;
if OBJECT_ID('tempdb..#A') IS NOT NULL DROP TABLE #A;
set nocount on;
create table #A
( obj_id int,
obj_name varchar(50),
obj_dt dat...
Mola asked 7/3, 2019 at 13:39
4
Solved
I'm trying to save a R dataframe back to a sql database with the following code:
channel <- odbcConnect("db")
sqlSave(db, new_data, '[mydb].[dbo].mytable', fast=T, rownames=F, append=TRUE)
...
3
Simple R script
library(RODBC)
odbChannel <- odbcConnect(dsn = "CTPRD03", uid = "BD_RPT_RO", pwd = "****")
df.test <- sqlQuery(channel = odbChannel, query = "select * from DUAL;")
df.test
cl...
3
Solved
With RODBC, there were functions like sqlUpdate(channel, dat, ...) that allowed you pass dat = data.frame(...) instead of having to construct your own SQL string.
However, with R's DBI, all I see ...
6
I'm having some difficulty inserting a data frame into a mySql database using RODBC.
Below is the code I'm using:
data <- data.frame(analysedDataID=c(1,2,3), plateWell=c("a","b","c"), screenPl...
1
I have a few .sql files which aggregate a number of tables/views in a SQL Database. I want to be able to direct R to a specific sql file and execute it and return the results in a dataframe.
Googl...
4
Solved
Simple question, but cannot find the answer.
Instead of:
Df <- sqlQuery(ch, "SELECT * FROM tblTest WHERE Id=25")
I want a more dynamic piece of code. Something like:
Id <- 25
Df <- sq...
0
4
I'm trying to use
odbcDriverConnect('driver={SQL Server};server=servername\instancename,port;database=testing;username=abc;password=123456')
to connect remote database server (sql server 2008)...
Collado asked 14/3, 2013 at 21:59
3
Solved
I am connecting to an Oracle database via DNS (set up the connection on the tnsnames.ora with the name "database").
I am able to succesfully run the following code:
con <- DBI::dbConnect(odbc...
8
Solved
When I tried to connect R with Access database I get an error
odbcConnectAccess is only usable with 32-bit Windows
Does anyone has an idea how to solve this?
library(RODBC)
mdbConnect<-odb...
2
I am trying to query a variable from a Microsoft SQL Server database using R/RODBC. RODBC is truncating the character string at 8000 characters.
Original code: truncates at 255 characters (as per...
Beadruby asked 29/5, 2017 at 20:14
4
Solved
I'm using RODBC package to access my sql database in R. I haven't been able to find any useful information on how to pass a vector from R to sql as a vector.
id <- ('00003', '00100')
query &l...
5
Solved
Does anyone have a connection string example for using RODBC and connecting to MS SQL Server 2005 or 2008.
Thank you.
3
I am trying to update a SQL table using sqlSave function of RODBC package in R.
Data is present in a data frame.
When I try to run the command:
sqlSave(DBConn, dat=df, verbose=T, tablename='table'...
Mccaffrey asked 15/5, 2016 at 16:5
6
Solved
I am working on saving twitter search results into a database (SQL Server) and am getting an error when I pull the search results from twitteR.
If I execute:
library(twitteR)
puppy <- as.data...
1
I'm trying to insert a new row to a table in a Microsoft Access database containing a memo field using the sqlSave function in RODBC, and I'm getting the following error:
Calloc' could not alloc...
1
Solved
I would like to enter a data frame into an existing table in a database using an R script, and I want the table in the database to have a sequential primary key. My problem is that RODBC doesn't se...
Horselaugh asked 12/5, 2018 at 15:56
5
I am trying to query through R OBDC. But one Column name has space on it. For example, [Account No].
I am using this code to query:
esiid_ac <- sqlQuery(myconn, paste("
SELECT * FROM Custome...
2
Solved
Hi I am using R to save a data frame into a DB2 SQL table. I seem to be able to create the table skeleton, but not append the data to the table -
>df <- read.csv("dat.csv")
where dat.csv i...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.