similar to: Active Record: Prepared Statements?

Displaying 20 results from an estimated 3000 matches similar to: "Active Record: Prepared Statements?"

2007 Mar 06
2
Package RODBC
I have some questions about the RODBC package. library(RODBC) # required for those who want to repeat these lines 1st, I noticed that the following sequence does not work: channel <- odbcConnextExcel("test.xls") tables <- sqlTables(channel) name1 <- tables[1, "TABLE_NAME"] # this should be the name plan1 <- sqlFetch(channel, name1) # bang!
2007 Apr 19
2
element search
Dear R-experts, I have got an excel file as attached. I imported it successful with the commands: library(RODBC) channel <- odbcConnectExcel("data2.xls") tables <- sqlTables(channel) # list the names of the spreadsheets name1 <- tables[1, "TABLE_NAME"] # get the name of the 1st spreadsheet plan1 <- sqlQuery(channel, sprintf("select * from [%s]",
2006 Feb 07
5
OCI adapter slowdown on dictionary access
Hi, after some experience with Rails on MySQL databases I gave it a try on one of our larger Oracle database. I was facing a problem when Rails tried to detect the columns for a model/table. The appropriate statement ran about 1 min which led to a timeout. Our Oracle guru told me to analyze the SYSTEM schema. After that hadn''t helped, he said the only remaining chance is to use a
2006 Jan 10
5
Oracle 10g Express - generate scaffold gives error
Hello, I have Oracle XE installed. I have a table USERS. When I try to generate a scaffold it gives me this error. I tried also with Mysql and it worked. E:\radrails\projects\MPS>ruby script\generate scaffold user exists app/controllers/ exists app/helpers/ create app/views/user exists test/functional/ dependency model exists app/models/ exists
2010 Feb 10
1
mean calculation within dataframe corrupted
Dear R-helpers, my little function below calculates the group score (tmpGroupMean) of an item, appends a "_mean" on its name and stores its value on this name. However, it does not calculate the mean of these scores (LVMean) in the same row correctly, as you can see in the below output which strangely also contains NAs. What is wrong?? Thanks for any hint!!! ###### ## start
2008 Feb 22
2
Connecting to Oracle from Rails 2.0.2
Long afternoon, but finally got it. Hope this spares you some pain: Installation instructions mainly based on: http://ruby.about.com/od/enterprise/ss/ruby_oracle.htm Install Oracle Instant Client: mkdir C:\oracle cd c:\oracle Get the following files from here: http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html and unzip them into the c:\oracle\ unzip
2006 Jan 12
7
Is anyone using oracle with RoR successfully?
Hi, Is anyone using Oracle with RoR successfully? Is everything running smoothly? What are the main issues? any response is appreciated thanks, Chris -- Posted via http://www.ruby-forum.com/.
2007 Apr 18
10
importing excel-file
Dear R-experts, It is a quite stupid question but please help me. I am very confuced. I am able to import normal txt ant mat-files to R but unable to import .xls-file I do not understand the online help. Can please anyone send me the corresponding command lines? The .xls-file is attached. In my file we use commas for the decimal format (example: 0,712), changes might be needed. Thanks, Corinna
2006 Mar 10
14
Oracle Date type errors rails on edit
I have a table with "expires_on" a DATE field. "Show" and "Destroy" work, but "Edit" errors: /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:150:in `select_hour'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:149:in `select_hour'' It only happens when
2006 Jan 13
19
Problems with scaffold''s parameter on Oracle
Hi I run Ruby on Rails on Oracle XE. I have a simple table: create table customer(id number primary key, name varchar2(100)); And ruby script\generate model Customer ruby script\generate controller Customer http://localhost:3000/customer/ - show a fine list, but when I click show/edit/destroy, I get an ORA-01722: OCIError: ORA-01722: invalid number: select * from (select raw_sql_.*,
2011 Apr 18
12
Arel - clone bug (and fix), feature requests
Hi all, I''ve been playing around with Arel this week (actually outside of Rails) and found an issue with the clone implementation. I''ve added a patch and a testcase here: https://github.com/codders/arel/commit/660f706491ac012cb133554cffeaa6b9ae6046e9 and made a pull request against the rails/arel repo. I''ve also been playing around with support for ordering on
2008 Mar 05
4
Excel export into R
Hello, I have this in excel Control 543_BU 123_AT 432_CU I want to be able to import to R so that it will read like this c<-c("543_BU","123_AT","432_CU") output: [1] "543_BU" "123_AT" "432_CU" This is just a short version. I have about 200000 rows and i need a simpler way instead of typing each one. thanks -- View this message
2008 Jul 16
5
''$'' placeholder naming can confuse your runner
Hi guys, I''m facing a strange behavior that smells like a bug. consider this scenario: Scenario: I''m cool Given that I am cool 4 times out of 7 and this step: Given("that I am cool $n times out of $n_total") do |n, n_total| ... end When running my story, this step is considered as PENDING. If I change the name of the second placeholder to $total, the step runs
2006 Aug 08
11
When will rails support true prepared statements?
I''m in an Oracle shop, and it''s the 1 thing that gets on my bosses nerves. I wish they would support this. Anyone any idea if or when it will be supported? Thanks Chris -- Posted via http://www.ruby-forum.com/.
2012 Sep 11
3
question about how to set up an active record adapter to prefer use of prepared statements...
Hi, I am writing an active record adapter for our new database and when I run the tests I see lots of statements that could be run as prepared statements, but instead of passing me bindings AR passes me a fully specialized SQL string, not in all cases, but in many. Here is an example: SELECT addrs.* FROM addrs WHERE addrs.user_id = 153 FETCH FIRST 1 ROWS ONLY I do have this hook set up:
2011 Sep 13
4
Prepared statements and postgreSQL schemas
Hi guys. I''m using a postgreSQL with multiple schemas. To change between schemas I use the ''SET schema TO ...'' statement. That works ok in rails 3.0. Rails 3.1 uses prepared statements and does not take into account the ''schema_search_path''. This is a big problem because the statement is prepared once and then the same prepared statement is executed
2010 Oct 17
2
Why can't one run Wine apps in Windows
Hello, from mere curiosity, I copied my .wine folder to Windows and tried running the *.exe files therein (such as notepad.exe, clock.exe etc), but absolutely nothing seems to happen. Is this normal? Also, is the reason Wine programs don't run in Windows a legal or a technical one? And, in the latter case, could you provide some detailed info on why this is so? Thanks for all your help.
2005 Dec 11
9
LIKE SQL queries in rails
I''m trying to do something like: SELECT * FROM attachment WHERE filename LIKE ''%whatever%''; so my code is: @search = params[:search] @attachments = Attachment.find(:all, :conditions => ["filename LIKE ''%?%''", @search.to_s]) but that''s converting to: SELECT * FROM attachments WHERE (filename LIKE
2012 Jan 11
3
turning a list of vectors into a data.frame (as rows of the DF)?
As a newer R practicioner, it seems I stump myself weekly (at least) with issues that have spinning my wheels.  Here is yet another... I'm trying to turn a list of numeric vectors (of uneual length) inot a dataframe.  Each vector held in the list represents a row, and there are some rows of unequal length.  I would like NAs as placeholders for "missing" data in the shorter vectors. 
2006 Mar 23
11
ActiveRecord: Oracle metadata loading slow on large database
All, While attempting to use ActiveRecord against a large database, approx. 1700 tables and 4 million rows, I discovered an inefficiency in oci_adapter.rb. The problem seems to be the SQL being generated to lazy-load the columns metadata. "def columns(table_name, name = nil)" method generates the following SQL: select column_name, data_type, data_default, nullable,