[odb-users] ODB compiler for oracle, double qoutes SQL statements

Boris Kolpackov boris at codesynthesis.com
Tue Nov 20 08:25:00 EST 2012


Hi Magnus,

Magnus Granqvist <magnus.granqvist at tailormade.se> writes:

> The odb compiler generates oracle SQL code like this:
>
> "SELECT "boost_employee"."id" FROM "boost_employee" WHERE 
> "boost_employee"."employer"=:1"
> 
> This is not valid to run towards a oracle database as far as I know
> and when exeuting this SQL I  get an  ora error.

As far as I know, identifier quoting is legal in Oracle. In fact, it
is required if you use a keyword as a table or column name or if you
want to preserve case (Oracle upper-cases all the unquoted identifiers
by default). So ODB-generated queries are and were always quoted and
we never had any issues with that. What exactly is the error code and
message that you are getting?

One common situation where you would get an error trying to execute
an ODB-generated query is if the corresponding tables haven't been
created.

Boris



More information about the odb-users mailing list