Thank you Mike,
but I'm out of ideas with my problem, the resulting query return non-
zero result in sqlplus prompt, but SQLAlchemy
return me 0. So, what I'm looking for is number of found rows.
SELECT count(DISTINCT tad.name)
FROM analysisdataset tad LEFT OUTER JOIN processeddataset tprd ON
tad.processedds = tprd.id LEFT OUTER JOIN procdstier tpds ON
tpds.dataset = tprd.id LEFT OUTER JOIN primarydataset tpm ON
tprd.primarydataset = tpm.id LEFT OUTER JOIN block tblk ON
tblk.dataset = tprd.id LEFT OUTER JOIN analysisdstype tadt ON tad.type
= tadt.id LEFT OUTER JOIN analysisdsstatus tads ON tad.status =
tads.id LEFT OUTER JOIN analysisdsdef tadd ON tad.definition = tadd.id
LEFT OUTER JOIN physicsgroup tpg ON tad.physicsgroup = tpg.id LEFT
OUTER JOIN person tp1 ON tad.createdby = tp1.id LEFT OUTER JOIN person
tp2 ON tad.lastmodifiedby = tp2.id
WHERE tad.name IS NOT NULL ORDER BY tp2.lastmodifiedby DESC

and my result=select().execute()
looks like this

{'engine': <sqlalchemy.engine.threadlocal.TLEngine object at
0xb6e1698c>, 'dialect': <sqlalchemy.databases.oracle.OracleDialect
object at 0xb6e166cc>, '_ResultProxy__echo': False,
'_ResultProxy__key_cache': {}, 'keys': ['name)'],
'_ResultProxy__executioncontext':
<sqlalchemy.databases.oracle.OracleExecutionContext object at
0xb6ab398c>, 'cursor': <sqlalchemy.pool._CursorFairy object at
0xb6ab39cc>, 'rowcount': 0, 'connection':
<sqlalchemy.engine.base.Connection object at 0xb6a9324c>, 'closed':
False, 'props': {0: (NullTypeEngine(), 0), 'name)': (NullTypeEngine(),
0)}, 'columns': {'name':
Column('name',OracleString(length=500),nullable=False)}}

Any ideas, what's wrong?

Valentin.

On Apr 14, 5:25 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Apr 14, 2007, at 3:14 PM, vkuznet wrote:
>
>
>
> > Hi,
> > I'm trying to debug what's going on with ORACLE queries and found the
> > following. The SQLAlchemy constructs queries in a form:
>
> > select tad.name from Table AS tad;
>
> > but if I'll place this query directly into sqlplus it complains with
> > the following error:
> > ORA-00933: SQL command not properly ended (complain exactly on
> > keywords AS)
>
> from sqlalchemy.databases import oracle
>
> str(select(...).compile(dialect=oracle.dialect()))


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to