Interesting. I'm using Django 1.2.3.
I just manually applied the diff from
http://code.djangoproject.com/ticket/5985
which is to change from LIKE to LIKEC and it works now. Has this
regressed for some reason?
Looks like it was
http://code.djangoproject.com/browser/django/trunk/django/db/backends/oracle/base.py?rev=12293
that regressed back to LIKE. http://code.djangoproject.com/ticket/11017
the reason.
Tim.
On 02/12/10 15:13, Tim Sawyer wrote:
Hello,
I'm using Django against an Oracle 10 database. It used to work. Then
they upgraded it to 10.2.0.5 (not sure what from, I can probably find out).
This query now gives: ORA-01425: escape character must be character
string of length 1.
'SELECT "BROKER_LENDER_LOG"."BLL_SECURITY_TOKEN",
"BROKER_LENDER_LOG"."BLL_TRANSACTION",
"BROKER_LENDER_LOG"."BLL_TYPE",
"BROKER_LENDER_LOG"."BLL_AGREEMENT_NUMBER",
"BROKER_LENDER_LOG"."BLL_MODULE",
"BROKER_LENDER_LOG"."BLL_LENDER",
"BROKER_LENDER_LOG"."BLL_SERIAL",
"BROKER_LENDER_LOG"."BLL_VERSION",
"BROKER_LENDER_LOG"."BLL_JOBID",
"BROKER_LENDER_LOG"."BLL_PROJECT",
"BROKER_LENDER_LOG"."BLL_XML",
"BROKER_LENDER_LOG"."BLL_LENDER_RESPONSE", "BROKER_LENDER_LOG"."BLL_DATE"
FROM "BROKER_LENDER_LOG" WHERE ("BROKER_LENDER_LOG"."BLL_JOBID" LIKE
TRANSLATE(%s USING NCHAR_CS) ESCAPE TRANSLATE(\'\\\' USING NCHAR_CS) AND
"BROKER_LENDER_LOG"."BLL_MODULE" = %s ) ORDER BY
"BROKER_LENDER_LOG"."BLL_SERIAL" ASC'
I guess the problem is:
LIKE TRANSLATE(%s USING NCHAR_CS) ESCAPE TRANSLATE(\'\\\' USING NCHAR_CS)
where it thinks that \'\\\' is more than one character?
Cheers for any clues,
Tim.
--
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.