Opened 15 years ago

Last modified 14 years ago

#13436 closed

oracle startswith etc fails — at Initial Version

Reported by: kthhrv Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords: oracle
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

OracleDBModel.objects.filter(namestartswith='abc')

DatabaseError: ORA-01425: escape character must be character string of length 1

changing
django/db/backends/oracle/base.py
-'startswith': "LIKE TRANSLATE(%s USING NCHAR_CS) ESCAPE TRANSLATE('
' USING NCHAR_CS)",
+'startswith': "LIKE %s ESCAPE '
'",
appears to fix the problem

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top