similar to: Composite primary keys and :joins=>

Displaying 20 results from an estimated 100 matches similar to: "Composite primary keys and :joins=>"

2006 Jul 14
3
compare two tables and find the difference?
I need to compare a column in TableA to a column in TableB and then select 3 columns from TableA for all the records in TableA that don''t exist in TableB. TableA and TableB are different but do have one field in common that i am comparing. The tables are not related in anyway. right now I have a find_by_sql query located in a model that looks like this: def self.absent_charges
2012 Mar 29
2
subtract a list of vectors from a list of data.frames in an elegant way
Dear R experts, I've realized that it might not be possible to define a negative SELCET statement in a SQL call so now I'm looking for the smoothest way to generate a list of what I would like from my large database by first pulling all the names with a query like this "SELECT top 1 * FROM your_table" (thank you Bart Joosen for the idea) and then subtract the variables I am not
2006 Feb 23
9
Balancing multiple connections and NAT
Hi, I have a client connected to the ''net through 3 ISP''s. Have set up a Linux box to do routing and load sharing for the 3 connections. A fourth interface is connected to the LAN with private IP addresses. Am using iptables to SNAT traffic to the appropriate IP depending on the interface the packet gets routed onto. The setup looks something like this: Interface IP
2007 Jul 30
3
SortHelper problem
I have TableA with name, description, start time displayed on one page. TableB has name, comment, file path and is displayed on another page. I''m using the SortHelper2 helper to help me sort the columns of these tables, however I''m experiencing a problem whereby if I sort TableA by description and then go ahead and view TableB I get an error message saying SQL Command Failed,
2006 Mar 15
4
help with DRY violation
I''m trying to be a good rails developer and fix DRY violations as i find them. However, i''m trying to fix this one, i cant seem to get it to work. I have two tables A and B that have a one-to-one relationship. Table B belongs_to Table A. Table A has_one Table B. I''m creating instances of Table A in different places, depending on the controller. However, for each
2006 May 15
0
Insert database into two tables.
Hi All, I have problem with inserting new record into the database. I have a form has 4 fields, and two fields will be inserted into tableA, and other fields will be inserts into tableB. These two tables has relationship tableA(One) and tableB (Many) ...so how could I do that? Socheat Yi Web Programmer/Software Developer Screened Images Multimedia (SIM) *If You Can Imagine It...We Can
2018 May 02
2
Merging dataframes
Thanks - Peter, Eivind, Rui Sorry, I perhaps could not explain it properly in the first go. Trying to simplify it here with an example - Say I have two dataframes as below that are NOT equally-sized data frames (i.e., number of columns are different in each table): Table_A: Email Name Phone abc at gmail.com John Chan 0909 bcd at yahoo.com Tim Ma
2005 Dec 21
10
can an active records maps to N tables?
Hi, Is it possbile that one active record maps to N tables, actually the relation is 1 to 1, I wonder it is possible. also can a ruby object map to N tables, instead of an active records? Thanks you very much:) Saiho __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2018 May 02
0
Merging dataframes
Hi, I'll coded your example into R code: Table_A <- c('abc at gmail.com', 'John Chan', '0909') Table_A <- rbind(Table_A, c('bcd at yahoo.com', 'Tim Ma', '89089')) colnames(Table_A) <- c('Email', 'Name', 'Phone') Table_A Table_B <- c('abc at gmail.com', 'John Chan', 'M',
2006 Jan 03
3
Can I map 2 tables into one class
Can I map 2 tables into one class? Is there any pattern, e.g. using ActiveRecord aggregation? Thanks Szczepan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060103/fa2aed7c/attachment.html
2005 Dec 02
1
Bug with Postgres and/or HABTM?
Hello list, I think I''ve found a bug in the way Rails is talking to my Postgres DB when recording HABTM data. My join_table looks like this: id serial primary key, tablea_id integer references tablea(id), tableb_id integer references tableb(id), other_attributes... When Rails writes to join_table, I''d expect it to do something like: INSERT INTO join_table (tablea_id,
2006 Jul 10
10
has_many :through and foreign key parameters
I just took my HABTM and turned it into a :through since my join table has another "non-joiny" attribute. I went from this: has_many_and_belongs_to :jobs, :join_table => ''tablename'', :foreign_key => ''x'', :association_foreign_key => ''y'' to this: has_many :jobs, :through =>
2006 Aug 15
1
sorting attribute in list from foreign table
Hello, I currently have two tables. table_a ( id table_b_id other_attrs ) table b ( id name ) So table A holds an id from table B. During the listing of tuples in table A, it lists table A''s attributes. In place of the table B id, I check the id, and instead display the name corresponding to that id. Now I want to be able to sort the listing of tuples in table A by the
2007 Mar 15
5
rake spec:views no transaction error
Hello, I have recently upgraded to the 0.8.2 release of rSpec, and I am receiving the following message with each view spec execution: WARNING: there is no transaction in progress I have upgraded the rspec_on_rails plugin as well, and both the model and controller tests are working flawlessly. Is there some simple step I missed? thanks for the input. -Chris -------------- next part
2007 Aug 30
0
Help with acts as paranoid
Hello, I am using acts as paranoid which works great. But I have the following problem. I have table a which has a has_many :tableb, :dependent => false relationship with table b. If I delete something in a and then try to edit a field in table b I get an error because it says the data does not exist so it doesn''t allow the update. I understand of course why this happens but I
2018 May 01
4
Merging dataframes
Hi, May I please ask how I do the following in R. Sorry - this may be trivial, but I am struggling here for this. For two dataframes (A and B), I wish to identify (based on a primary key-column present in both A & B) - 1. Which records (rows) of A did not match with B, and 2. Which records of B did not match with A ? I came across a setdt function while browsing, but when I tried
2012 Sep 20
1
SQL query with Multicore option on R -linux
Hi all, I have the following sql query that I am executing on a machine with single core. I want to know how can I execute the same sqery on a maching that is running with 4 cores. Please provide me the code. NEW_TABLE <- rhive.query("SELECT A, B, COUNT(C) FROM TABLE_A WHERE A>='01-01-2012'") Also let me know how can I leverage only 2 / 3 cores of the machine.
2012 Jun 14
1
readHTMLTable function - unable to find an inherited method ~ for signature "NULL"
Hi R experts, I have been playing with library(XML) recently and found out that readHTMLTable workls flawlessly for some website, but it does give me an error like below ... Error in function (classes, fdef, mtable) : unable to find an inherited method for function "readHTMLTable", for signature "NULL" let's say..for example, this code works fine a
2007 Feb 13
16
Error against latest trunk while testing via spec for model
Hi I just did an update to lates trunk ================= context "Given a generated venue_spec.rb with fixtures loaded" do fixtures :venues specify "fixtures should load two Venues" do Venue.should have(2).records end end ================== gives me ========== 1) TypeError in ''Given a generated venue_spec.rb with fixtures loaded fixtures should load two
2008 Dec 23
1
aggregate / tranpose data
Dear R-Users, Suppose I have data in the following format: CODE_NAME ZIP_CODE John 12345 John 23456 John 34567 Jane 13242 Jane 22123 I want to transpose / convert it into: CODE_NAME ZIP_CODE John 12345,23456,34567 Jane 13242,22123 Any idea/pointer is appreciated.