The plot thickens. I created a new stored proc which does not join to the pricedata table, but just uses the masterdates table; NOW when I do "if r[:weekendday] == 0", it works, and I only get records where weekendday is in fact 0.
I'm going to strip this all down as much as possible, with small tables and simple joins and see if I can reproduce it that way. I'll post when I have something. Thanks everybody! have a good weekend On Fri, Sep 25, 2009 at 3:50 PM, David Jenkins <[email protected]>wrote: > Same thing, nothing passes the "if". > > > On Fri, Sep 25, 2009 at 3:29 PM, John W Higgins <[email protected]> wrote: > >> >> >> On Fri, Sep 25, 2009 at 12:19 PM, David Jenkins <[email protected]>wrote: >> >>> Hi, John >>> >>> Thanks for the suggestions. Using :holiday does the same thing, i.e., I >>> can't use it in an "if" test. I also tried setting a variable, "some_var" >>> to r[:weekendday], and sure enough it gets set to 0 or 1, and its class is >>> Fixnum. >>> >>> Again, since this works with a select statement and not when I use a >>> stored proc that returns a dataset, it seems to be a problem with the >>> latter. I'm am trying to debug the sequel code in NetBeans 6.7, but I'm >>> getting weird results: it keeps stopping on comment lines, as if the file >>> it's showing is not the file it's running (and the file its actually running >>> has actual non-comment code on those lines) -- the file in question being >>> mysql.rb. >>> >>> >> Just for a lark - could you try if 0 == r[:weekendday] ? It may be that >> something is overriding the == function somewhere and that by inverting the >> if statement then you would be working with the 0's (i.e. Fixnum) version of >> == for certain. >> >> John >> >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
