rodbc

RODBC Multiple Inputs from Shiny

北战南征 提交于 2019-12-12 01:58:49
问题 I have a Shiny app that has a checkbox group input. The user can select multiple inputs. I also have an ODBC connection linked to a database. The process would be that when a user selects items from the check box group, that user input would be part of a string in the sql query to filter the data. UI.R (partial to show example) checkboxGroupInput('Type', 'Type', c( "AX"="AX", "AY"="AY", "AZ"="AZ", "BGB"="BGB", "BT"="BT", "BX"="BX", "BXT"="BXT", "C"="C", "CNT"="CNT")), The column in the table

RODBC returning 0 values

早过忘川 提交于 2019-12-11 14:14:57
问题 I am accessing a commercial DB. Via prompt: select PersonCode, PersonDate from CODB.mastertable where PersonCode=42 PersonCode PersonDate ----------- ------------ 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 42 Jan 3 2011 In R: library(RODBC) query <- "select PersonCode, PersonDate from CODB.mastertable where PersonCode=42" connection1 <- odbcConnect("RESDB", uid="userID", pwd="pwdaccess", believeNRows=FALSE)

RODBC error: SqlSave unable to append to table

走远了吗. 提交于 2019-12-11 13:04:45
问题 we hit to an error with RODBC and SqlSave command. We are a bit confused what to do since the same SqlSave command works when data that we are trying to save to Sybase database is small (~under 10.000 rows). When trying to save bigger data (~200.000 rows) saving process starts without any problems but it crashes after few thousand rows is saved. Then we hit to this error message “unable to append to table..” We use this kind of code: library(RODBC) channel <- odbcConnect("linfo-test", uid=

R and Oracle SQL

跟風遠走 提交于 2019-12-11 10:27:05
问题 Have anyone tried to use R and Oracle servers? The credientials required for connection are: HOST = somewhere.com PORT = 1525 SERVICE_NAME = someservice USERNAME = user PASSWORD = pass I've tried RODBC: library(RODBC) channel <- odbcConnect("somewhere.com:1525/someservice", uid="user", pwd="pass") But it only gives me these warnings: Warning messages: 1: In odbcDriverConnect("somewhere.com:1525/someservice", uid="user", pwd="pass") : [RODBC] ERROR: state IM010, code 0, message [Microsoft]

How to connect R with PostgreSQL on OSX 10.10.2?

十年热恋 提交于 2019-12-11 09:45:06
问题 I have the following setup: OSX 10.10.2 PostgreSQL 9.4.1 R 3.1.3 This answer as of 2011 says that the easiest approach is to use RpgSQL package. But it is removed from the CRAN repository. RODBC mentioned there is available as source, but it fails to configure: configure: error: "ODBC headers sql.h and sqlext.h not found" ERROR: configuration failed for package ‘RODBC’ I've also found another package, which could help me - RPostgreSQL, but it fails to compile: In file included from RS

SQL query error with ODBC connection in R using Informix driver

喜夏-厌秋 提交于 2019-12-11 08:04:49
问题 With functionality from the RODBC package, I have successfully created an ODBC but receive error messages when I try to query the database. I am using the INFORMIX 3.31 32 bit driver (version 3.31.00.10287). channel <- odbcConnect("exampleDSN") unclass(channel) [1] 3 attr(,"connection.string") [1] "DSN=exampleDSN;UID=user;PWD=****;DB=exampleDB;HOST=exampleHOST;SRVR=exampleSRVR;SERV=exampleSERV;PRO=onsoctcp ... (more parameters)" attr(,"handle_ptr") <pointer: 0x0264c098> attr(,"case") [1]

Passing a SQL input date range into a query in SHINY

♀尐吖头ヾ 提交于 2019-12-11 07:28:52
问题 I'm learning to use Shiny and shiny dashboard and working with a sql database SQL-SERVER where I'd like to pull the data straight from the database. Essentially the idea is to merge to columns in a table that have a start spot and a stop spot for a date range, tabulate them and then diagram them. I found the following posting on how to pass sql input statements into shiny: How to pass input variable to SQL statement in R shiny? Unfortunately when I try and apply this I get an error 'subscript

Why does sqlQuery from SAP HANA using RODBC return no data if request 18 or more rows

天涯浪子 提交于 2019-12-11 05:38:45
问题 I have a 64-bit Windows 7 machine with HANA Client installed and an ODBC connection to an SAP HANA database. In the ODBC Data Source administrator, I have added a connection to the required database and can successfully connect. I am trying to use RStudio to retrieve data for analysis using R. I am finding that queries that return a handful of rows ("TOP 1" to "TOP 17") successfully return all 71 columns of data for the requested number of rows, but when I query with "TOP 18" or higher number

Avoiding backtick characters with dplyr

守給你的承諾、 提交于 2019-12-11 04:27:58
问题 How can I write the argument of select without backtick characters? I would like to do this so that I can pass in this argument from a variable as a character string. df <- dat[["__Table"]] %>% select(`__ID` ) %>% mutate(fk_table = "__Table", val = 1) Changing the argument of select to "__ID" gives this error: Error: All select() inputs must resolve to integer column positions. The following do not: * "__ID" Unfortunately, the _ characters in column names cannot be avoided since the data is

Unable to Append to Table with Autonumber Column with RODBC

こ雲淡風輕ζ 提交于 2019-12-11 03:43:24
问题 I'm attempting to insert a new row to a table in a Microsoft Access database using RODBC. Problem is the primary key column is an autonumber, and it doesn't seem to let me omit this column. I am using the sqlSave function with append = TRUE and a data frame with a single row. I have tried the following: 1: Leaving the column out of the dataframe entirely. This results in the error: Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : missing columns in 'data' 2: Setting