similar to: sql server & linux: left join problem

Displaying 19 results from an estimated 19 matches similar to: "sql server & linux: left join problem"

2006 Jan 10
1
sql server freetds/odbc question
I''m having an error from Linux via freeTDS/ODBC to SQL Server with cod that runs fine against SQLite and MySQL. Here''s the code: def find_recipes_for_workorder_by_id @recipe_pages, @recipes = paginate_with_sort :recipes, :per_page => 10, \ :conditions => ["recipe.workorder_id = ?", params [:workorder]] render :template =>
2005 Nov 30
3
Downcasing Legacy Table Column Names
I''m looking for the simplest way to *automatically* downcase the attribute names of Models mapped to legacy tables that use upper case. eg: class Workorder < ActiveRecord::Base set_table_name "WORKORDER" end which has "NAME" as an attribute can use "name" as an attribute. currently: workorder = Workorder.find(1) workorder.NAME # =>
2006 Jan 06
2
How do I reference eagerly loaded Models in the View?
[I hope the repost isnt'' "minded". Following the advice of another thread I''ve changed the subject to a question. If I haven''t included important info, please ask. My database is being unduly killed. Jodi] Cheers on-the-Rails-ers, Before I start, I''ve read the ActiveRecord docs on eager loading, but for the life of me, I can''t seem to get
2006 May 15
1
Ajax Scaffold is htmlescaping "&" in url''s
Seems like I have a problem with html escaping of "&" in my url''s. "Create New" have following link: http://localhost:3000/stylesheets/new?scaffold_id=stylesheet&amp;page=1&amp;sort_direction=asc Any ideas how I can fix this? Using: ajax_scaffold_generator (3.1.2) & rails (1.1.2) Regards Henrik
2013 Apr 03
2
strange behavior with active relation any? method
In console, I run the following and any? returns true: drivers = Driver.select("drivers.*, drivers.id").joins([:reports, :driving_habits]).where("extract(MONTH FROM reports.time) = ? AND extract(YEAR FROM reports.time) = ?", 3, 2013).uniq.order("drivers.id asc").page(2).per(1) drivers.any? => true This correctly evaluates to true because the relation contains one
2006 Jan 05
0
Keep the Queries Down or "Referencing eagerly loaded models"
Before I start, I''ve read the ActiveRecord docs on eager loading, but for the life of me, I can''t seem to get it working. What I mean by this, is that the eager query looks good (I can paste the sql dump, but it looks good to me - and runs well independantly), but it seems that I''m referencing the eagerly loaded data in a way that activerecord doesn''t
2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
I have implemented Devise for Authentication and Authorization in ROR application everything seems fine but getting one issue. I have two modals "Account" and "Transactiona" , and so two controllers respectively. My Transaction Index view call one of Account Controller method like this
2005 Nov 03
9
[Idea] session-wide persistent variables
I was thinking about having instance variable stored and fetched from session container automatically before calling an action and after the action is finished. Using methodology of accessors it would look like: class MyController < ActionController::Base persistent_attr :person def alfa person = ''John Smith'' # render as usual view alfa.rhtml with anchor
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions User.find :first, :conditions => ["login=?", params[:username]] but how about with :order, :limit or :group? # uh-oh...spaghetti-oh User.find :first, :order => "login; delete from users; select * from users" Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2007 Apr 14
5
SAMBA Problem - Users take ownership
Hi, I have a problem with my Samba/WinBIND implementation. In folders shared by multiple people the last one to access and modify a file takes ownership of the file and changes the permissions so other users cannot make changes to the same file: [root@atlas PLANNING RECORDS]# cd REGIONAL\ 1\ AIRLINE\ DOCS/ [root@atlas REGIONAL 1 AIRLINE DOCS]# ls -al total 1232 drwxrws---+ 8 root
2009 Oct 21
1
megatec_usb and "fry's" UPS
Gidday all - I've got a 1700VA dynamix UPS which is USB. The previous model (with a serial port) worked wonderfully with megatec, but this new one with USB is not working. It feels like the kernel is not handing the USB device properly. The web has not yeilded any useful info. What can I do from here? I'm not sure if its a kernel problem or a UPS config problem, but I'm hoping
2009 Oct 20
1
megatec_usb and "fry's" UPS
Gidday all - I've got a 1700VA dynamix UPS which is USB. The previous model (with a serial port) worked wonderfully with megatec, but this new one with USB is not working. It feels like the kernel is not handing the USB device properly. The web has not yeilded any useful info. What can I do from here? =========================================== [root at hera ups]# lsusb Bus 006 Device 002:
2006 May 18
3
Model Madness: habtm vs through
This has me scratching my head: a Person has many Things a Person has many Collections a Collection has many Things ...Things in a Collection are ordered ...Things in a Collection can be related to (created by) any User ...a collection has additional attributes, such as a name etc I am confused about habtm in rails (especially when using acts_as_habtm_list) vs. going the :through route.
2006 Aug 02
10
Ruby deamon
We are building a web-based application with Ruby on Rails and MySQL backend. The client now wants us to add various workflow features that will eventually expand into SOAP web services. These workflow features include tasks such as automatically sending reminders for due tasks, or if a particular set of information hasn''t been logged by a certain time to automatically send an email
2006 Mar 18
2
redirect killing dispatch.cgi
hi, having a maddening problem with a redirects between controllers. app is working fine on my two local machines, a mac and a pc, with either webrick and lighttpd/cgi on either machines. i move it to my hosting provider and try to get it working with apache + cgi, most of it works, but it fails at a specific spot, and causes dispatch.cgi to hang indefinitely. nothing shows up at all in the
2005 Sep 18
5
NameError: uninitialized constant Addres
I created some scaffolding for an Address model and an Addresses controller. When running the functional tests for the addresses controller, I get this exception: "NameError: uninitialized constant Addres" The exception seems to start from this function: def list @address_pages, @addresses = paginate :address, :per_page => 10 end I''m guessing pluralization bug?
2006 Jan 04
2
Updating Attributes in a HABTM Join Table
Is there a way to update attributes in a HABTM join table? Right now I am deleting the join and then recreating it with new attributes. I have a table "categories" and another table "items". They are both HABTM with the join table "categories_items" between them. If an item is joined to a category once, no problem, we create the join. But if an item is
2006 Jan 02
6
Paginate with joins messing with id
Hi all, Best wishes for the new year! :'') I''m very new to Ruby and Rails, and I ran into a problem with the "paginate" function. When I use the following method to get a number of forum topics based on a category name passed via the URI: @topic_pages, @topics = paginate :topics, :joins => "INNER JOIN categories ON
2006 Apr 09
4
Inheritance via Though Associations?
I posted something about this a week ago wihtout response, but have made some progress since. However, I''m still not getting exactly what I want. OK, three core tables: create_table :reference_items do |t| t.column :title, :string, :limit => 255 t.column :year, :integer, :limit => 4 t.column :type, :string t.column