sqlingvo icon indicating copy to clipboard operation
sqlingvo copied to clipboard

db/oracle should not quote tables and identifiers

Open drankard opened this issue 10 years ago • 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.

drankard avatar Aug 26 '14 09:08 drankard

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.

r0man avatar Sep 30 '14 13:09 r0man

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

drankard avatar Oct 03 '14 11:10 drankard

Hey @drankard,

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

Roman

r0man avatar Oct 04 '14 21:10 r0man