r0man/sqlingvo

db/oracle should not quote tables and identifiers

drankard opened this issue · 3 comments

Isn't it wrong to quote oracle tables and identifiers ?
I get error when calling oracle.

(query my-oracle 
       (sql (oracle)
            (select [:sysdate]
                    (from :dual))))

generates following:

[SELECT "sysdate" FROM "dual"]

result:

Error: ORA-00942: table or view does not exist

I would think this because there is no table called "dual" (quoted) ?
same problem with the "sysdate" identifyer.

Hmm, I think either the quotes should be left off, or quoted identifiers should be upper cased. Can you confirm this? Sorry for the late repsone. Traveling at the moment.

They should be left off, Oracle is using quotes as regular chars.
if you query SELECT "sysdate" FROM "dual" you tell oracle to look for a table called "dual" and not dual

Hey @drankard,

can you check the latest changes in master, and confirm that this
is working for you?

Roman