OK - here's my 2 cents:
Django 1.2.1, Oracle 9.2.0.7
Cheers
Jirka
In [1]: from django.db import connections
In [2]: c = connections['oracle'].cursor()
In [3]: c.execute(r"SELECT 1 FROM DUAL WHERE 'A' LIKE TRANSLATE('A'
USING NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)")
---------------------------------------------------------------------------
<class 'django.db.utils.DatabaseError'> Traceback (most recent call last)
/data/ig/webapps/ig/<ipython console> in <module>()
/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py in
execute(self, query, params)
505 self._guess_input_sizes([params])
506 try:
--> 507 return self.cursor.execute(query,
self._param_generator(params))
508 except Database.IntegrityError, e:
509 raise utils.IntegrityError,
utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
<class 'django.db.utils.DatabaseError'>: ORA-01425: escape character
must be character string of length 1
In [4]: c.execute("SELECT 1 FROM DUAL WHERE DUMMY LIKE TRANSLATE('X'
USING NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)")
---------------------------------------------------------------------------
<class 'django.db.utils.DatabaseError'> Traceback (most recent call last)
/data/ig/webapps/ig/<ipython console> in <module>()
/usr/lib/python2.5/site-packages/django/db/backends/oracle/base.py in
execute(self, query, params)
505 self._guess_input_sizes([params])
506 try:
--> 507 return self.cursor.execute(query,
self._param_generator(params))
508 except Database.IntegrityError, e:
509 raise utils.IntegrityError,
utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
<class 'django.db.utils.DatabaseError'>: ORA-01425: escape character
must be character string of length 1
--
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en.