ORACLE db name in table definitions

3 views
Skip to first unread message

vkuznet

unread,
Mar 23, 2007, 9:41:15 AM3/23/07
to sqlalchemy
Hi,
I've got a new DB to handle and the account is setup in a way that I
need to specify dbname for selects, e.g. select * from DBNAME.T

So, I created a table
T=Table('DBNAME.T'....)

and once I used it
res=select([T]).execute()
the sqlalchemy constructed the following query with *quotes*

select "DBNAME.T".id from "DBNAME.T"

the problem is that ORACLE doesn't accept it, but if I manually drop
*quotes* from this select and pass it to sqlplus everything works,
i.e.

select DBNAME.T.id from DBNAME.T

How to disable *quoting* for SQLAlchemy?

Thanks,
Valentin.

Michael Bayer

unread,
Mar 23, 2007, 10:56:17 AM3/23/07
to sqlal...@googlegroups.com
dont stick "foo.bar" in your table name. use the schema="DBNAME"
parameter on your Table.

vkuznet

unread,
Mar 23, 2007, 11:08:44 AM3/23/07
to sqlalchemy
Thanks,
it works.
Reply all
Reply to author
Forward
0 new messages