tried  p r[:weekendday].class, all Fixnum
:(


On Fri, Sep 25, 2009 at 1:48 PM, Jeremy Evans <[email protected]>wrote:

>
>
>
> On Sep 25, 10:01 am, David Jenkins <[email protected]> wrote:
> > here's one of the outputs, based on your suggestion:
> >
> > {:pricedate=>2009-08-19 00:00:00 -0400, :holiday=>0, :weekendday=>0,
> > :symbol=>"MSFT", :instrumenttype=>"S", :openprice=>23.25,
> > :highprice=>23.7199993133545, :lowprice=>23.25,
> > :closeprice=>23.6499996185303, :volume=>41822000, :openinterest=>0}
> >
> > which looks like I should be able to test for r[:weekendday] == 0
> >
> > I played with it some more, and if I omit the call to the stored proc,
> and
> > just use a sql select, e.g.,
> >
> > dataset = DB[:masterdates].left_outer_join(:pricedata, :pricedate =>
> > :pricedate, :symbol => 'MSFT', :instrumenttype =>
> > 'S').filter('(masterdates.pricedate > ?) and (masterdates.pricedate <
> ?)',
> > '2000-01-01', '2009-10-01')
> >
> > it works as expected, i.e., I can successfully test for r[:weekendday] ==
> 0.
> >
> > The problem seems to be the fact that the initial retrieval is via a
> stored
> > proc...?
>
> Maybe the stored proc is typecasting the value?  Honestly, I'm not
> sure.  You could try:
>
>  p r[:weekendday].class
>
> If it isn't Fixnum, that's probably the problem.  If it is Fixnum,
> then I'm completely stumped as to why r[:weekendday] == 0 would not be
> true.
>
> Jeremy
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to