Displaying 20 results from an estimated 200 matches similar to: "Insert a data in Oracle with Rails"
2006 Mar 01
2
Oracle auto_increment ??? & Rails
To make a new istance of an Oracle table with Rails, i need that this
table had a column named ''id''. This ''id'' must be Primary Key &
auto_increment;.
How Can I modify the ''id'' properties to do it Auto_increment in Oracle?
--
Posted via http://www.ruby-forum.com/.
2003 May 31
5
parse on left hand side of R assignment
I keep finding myself in a situation where I want to calculate a
variable name and then use it on the left hand side of an assignment.
For example
iteration <- 1
varName <- paste("run",iteration,sep="")
myList$parse(text=varName) <- aColumn
I want to take some existing variable "aColumn" and use the name
"varName" name for it and put it into a
2007 Oct 05
11
Session handling busted on Oracle
Hi,
Ruby 1.8.6 (one-click)
Camping 1.5
I''d submit this as a bug, but the tracker says I''m forbidden, so here
you go.
The first problem is that the sql to create the sessions table is
broken. This is what it tried to send:
CREATE TABLE sessions (
id NUMBER(38) NOT NULL PRIMARY KEY (38), --> Problem here
hashid VARCHAR2(32),
created_at DATE,
ivars CLOB DEFAULT
2003 Jun 17
2
Paste and namespace
Hi, my doubt is very simple. I'm sure I've seen someone using something
like this before, but unfortunatelly my searches in the archives were useless.
Well, I have some objects called after a name that has a number attached to
it,
varying. Let's say I have:
> ls
poly1 poly2 poly3 poly4 poly5 poly6 ...
I would like to access these objects using a for(), in which I could do
2006 Mar 01
7
Oracle Sequence & Rails
the compiler tell me it:
invalid column name: INSERT INTO ago.prova_stats (cognome, nome, id,
telefono) VALUES(''Medda'', ''Ivan'', :id, 70565611)
where ago.prova_stats is the table used by me and that have only the
columns ''cognome'',''nome'' and ''telefono''.
My table hasn''t the column
2007 Oct 08
0
Camping-list Digest, Vol 18, Issue 1
UNSUBSCRIBE
On Oct 5, 2007, at 1:27 PM, camping-list-request at rubyforge.org wrote:
> Send Camping-list mailing list submissions to
> camping-list at rubyforge.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://rubyforge.org/mailman/listinfo/camping-list
> or, via email, send a message with subject or body ''help'' to
>
2006 Mar 15
1
Through method problems with custom foreign_keys
A person has a many company_branches and
A company_branch has many people.
This join is represented using a "contacts" table.
I am using a legacy schema so i am forced into using non-standard rails
primary keys. I am using the new through relationship in rails 1.1.
p=Person.find(1)
b=p.company_branches # gives this error:
ActiveRecord::StatementInvalid: OCIError: ORA-00904:
2007 May 22
2
find :all :include broken on Oracle 10
Hi,
I am trying the following in Ruby using InstantRails 1.7 on WindowsXP
Publication.find(:all, :include => [:doc_type, :release_state] )
but I get the error:
OCIError: ORA-00904: "DOC_TYPES"."PUBLICATION_ID": invalid identifier:
SELECT publications.id AS t0_r0, publications.docid AS t0_r1,
publications.doc_type_id AS t0_r2, publications.title AS t0_r3,
2011 Mar 01
3
inefficient ifelse() ?
dear R experts---
t <- 1:30
f <- function(t) { cat("f for", t, "\n"); return(2*t) }
g <- function(t) { cat("g for", t, "\n"); return(3*t) }
s <- ifelse( t%%2==0, g(t), f(t))
shows that the ifelse function actually evaluates both f() and g() for
all values first, and presumably then just picks left or right results
based on t%%2.
2006 Jul 04
3
OCIError: ORA-00918: column ambiguously defined
Hi all,
when I execute the command "rake db:schema:dump" i get this error in the
db/schema.rb file.
____________________________________________________
# Could not dump table "region" because of following
ActiveRecord::StatementInvalid
# OCIError: ORA-00918: column ambiguously defined:
SELECT lower(i.index_name) as index_name, i.uniqueness, lowe
r(c.column_name) as
2006 Jun 24
5
Why is rails using DB objects that don''t exist?
I admit it--I''m newb right now. But only to rails, ruby and friends.
I''m walking through a "recipe" tutorial but have been stuck for hours;
it''s time to ask for help. On Windows I''ve got the latest ruby, rails,
and webrick; I''ve got the Oracle OCI "thing" to talk to our Oracle 10g
database, I''ve got Slick Edit and a
2007 Aug 24
2
error in rails 1.2.3 activerecord
i''m a rails nuby so i don''t know where to fix this in the activerecord
module....
there is no such column in the sys.view.user_constraints.
SELECT uc.index_name FROM user_constraints uc WHERE uc.constraint_type =
''P''
this prevents me from doing a rake test:functionals ...as in below....
C:\railsspace>c:\ruby186\ruby\bin\ruby c:\ruby186\ruby\bin\rake
2005 Nov 07
0
pk_and_sequence_for(table) bug?
Hi,
Doing connection.pk_and_sequence_for doesn''t return anything when I''m
positive I''ve got a PK and sequence on my table on column "id", see DDL
below. Is this a bug?
?> Player.primary_key
=> "id"
>> Player.connection.default_sequence_name "players"
=> "players_id_seq"
>>
2007 Nov 17
0
Postgres sequencer and rails
Hi All,
I''m wrestle with postgres database and rails.
Finally it''s working but i need some explanation :
So :
I have a sequencer :
CREATE SEQUENCE players_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 4
CACHE 1;
ALTER TABLE players_id_seq OWNER TO squash;
Table :
CREATE TABLE players
(
id bigserial NOT NULL,
firstname character varying,
2008 Jun 05
0
[LLVMdev] A question about CBackend.cpp
Hi,
I'm reading the code in CBackend.cpp and found some wired chunk in
void CWriter::printConstant(Constant *CPV)
938 if (ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) {
939 const Type* Ty = CI->getType();
940 if (Ty == Type::Int1Ty)
941 Out << (CI->getZExtValue() ? '1' : '0');
942 else if (Ty == Type::Int32Ty)
943 Out << CI->getZExtValue() <<
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
2004 Feb 19
1
read codebook function
Anexed is my function for reading codebooks and the Vq Table. My problem is:
I read a codeBook number of 41, so i called this function above 41 times.
The firtst time, the sync patterns (BCV) is alligned correctly, so it reads correctly. the sencond time it is executed, the patter is not there anymore and there are only 8 BCV in my file.
function fReadBits1 is the same as the ogg's read bit
2006 May 15
8
set_table_name and self.table_name
I have some legacy tables that I used set_table_name on, I''m attempting
to write a method that will get key value from a sequence table and then
update it and return a value. I''m hoping to put this in the base
ActiveRecord method so I would like to reference the table name with
self.table_name or something...
class Contacts < ActiveRecord::Base
set_table_name
2006 Oct 31
0
PSARC 2006/054 DTrace JNI Binding
Author: tomee
Repository: /hg/zfs-crypto/gate
Revision: 367993089b181886f94c88ffa5759d0626e95ad7
Log message:
PSARC 2006/054 DTrace JNI Binding
6384263 PSARC 2006/054 DTrace JNI Binding
Files:
create: usr/src/lib/libdtrace_jni/Makefile
create: usr/src/lib/libdtrace_jni/Makefile.com
create: usr/src/lib/libdtrace_jni/amd64/Makefile
create: usr/src/lib/libdtrace_jni/common/dtj_attr.c
create:
2008 Jun 11
2
starting record id is 10000 in oracle 10g ,why ?
i create a new model(User) and create a new record
(User.create(attributes)) in oracle
when i check User.find 1 in console
it gives record not found error
when i try
User.find(:first).id --> 10000
how to change this starting id into 1 ....
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to