> MySQL is silently turning that date column into a varchar inside the > CASE expression. Using this patch: > Oh, lovely. > > You have two options. One is easier and will save time in the short > run. The other is better in the longer run. One of the options is to > add a manual cast after the case statement: > > min([['C', :service_date]].case(nil, > :tx_class)).cast(Date).as(:date_of_service), > I didn't know about the ability to cast like that, but it certainly makes sense that you can. Nice trick there!
> The other option is to use a database that sucks less, such as > PostgreSQL. Which of the options is which is left as an exercise to > the reader. :) > Haha -- You're nothing if not relentless on that point. Switching to PostgreSQL just may happen before too long! Michael -- http://codeconnoisseur.org -- 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.
