Search Results

Search found 6 results on 1 pages for 'cyborgo'.

Page 1/1 | 1 

  • SQL Update help

    - by Cyborgo
    I have a really simple question, is it possible to update a table with new values using just one update statement. Say for example I have a table with author, title, date, popularity. Now I got some new data which has author name, title corresponding new popularity. How do I update the table now in one statement. Note that author and title are not unique.

    Read the article

  • Redirection in Rails

    - by Cyborgo
    Hi, I have a small question regarding rails. I have a search controller which searches for a name in database, if found shows the details about it or else I am redirecting to the new name page. Is there anyway after redirection that the name searched for to automatically appear in the new form page? Thanks in advance.

    Read the article

  • Queue management in Rails

    - by Cyborgo
    Hi, I am planning to have something like this for a website that is on Ruby on Rails. User comes and enters a bunch of names in a text field, and a queue gets created from all the names. From there the website keeps asking more details for each one from the queue until the queue finishes. Is there any queue management gem available in Ruby or I have to just create an array and keep incrementing the index in session variable to emulate a queue behaviour?

    Read the article

  • Problem with initializing a hash in ruby

    - by Cyborgo
    Hi, I have a text file from which I want to create a Hash for faster access. My text file is of format (space delimited) author title date popularity I want to create a hash in which author is the key and the remaining is the value as an array. created_hash["briggs"] = ["Manup", "Jun,2007", 10] Thanks in advance.

    Read the article

  • Oracle ORA-01795 error in Rails

    - by Cyborgo
    Hi, I am using Oracle as database for my Rails applications and have got some pretty intense tables. I'm trying to find the particular entries using a query like this Author.all( :conditions => { :name => names } ) I have been working SQlite all along and just migrated to Oracle which complains that IN clause has more than 1000 entries. Obvious workaround would be to break it into subclauses for which I need to write some raw sql queries. Is there anything in Rails that facilitate this?

    Read the article

  • Multiple row insertion in a faster way

    - by Cyborgo
    Hi, I am using rails and I am trying to insert new rows into the table. The data comes from a text file and I created hash with one of the attribute as key. Then I find all the keys that are currently not in the table. Then I need to insert all of them into the table with all the attributes that I saved in hash. newvals.each{ |x| author = Author.create(:first => x, :second => hash[x][0], :third => hash[x][1]) author.save } This has lot of overhead as it makes an SQL update one at time. The newals array is usually quite big around the size of 20-30k. I know create can insert multiple objects at once, but I cant seem to figure out how. Is there any way to get this done. Thanks.

    Read the article

1