On Mar 10, 2013, at 8:28 PM, Aymeric Augustin 
<[email protected]> wrote:

> Django does this already:
> https://github.com/django/django/blob/master/django/db/backends/oracle/base.py#L548-L555

Perfect. 

In the case of #20015, the issue is the other way round… the literal '2008%' 
cannot be implicitly converted to a date. Implicit conversion always go to the 
narrowest type. You would be better off converting it explicitly, e.g. to_date( 
'2008', 'YYYY'  ) or such. Then the query become date >= to_date( '2008', 
'YYYY'  ). Alternatively, you could convert the date column to a varchar: 
to_char( date ) like '2008%'… 



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to