On Dec 2, 3:17 pm, Tim Sawyer <list.dja...@calidris.co.uk> wrote:
> I unpatched mine (changed LIKEC to LIKE) and then ran:
>
>  >>> from django.db import connection
>  >>> cursor = connection.cursor()
>  >>> result = cursor.execute(r"SELECT 1 FROM DUAL WHERE TRANSLATE('A'
> USING NCHAR_CS) LIKE TRANSLATE('A' USING NCHAR_CS) ESCAPE TRANSLATE('\'
> USING NCHAR_CS)")
>  >>> rows = cursor.fetchall()
>  >>> for row in rows:
>  > ...   print row[0]
>  > ...
>  > 1
>  >>> print rows
>  > ((1,),)

Nuts.  What if you remove the first TRANSLATE call, i.e.

cursor.execute(r"SELECT 1 FROM DUAL WHERE 'A' LIKE TRANSLATE('A' USING
NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)")

If that also doesn't trigger the error, then maybe we need an actual
column in the mix.  Please try this also:

cursor.execute(r"SELECT 1 FROM DUAL WHERE DUMMY LIKE TRANSLATE('X'
USING NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)")

Thanks,
Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to