You might want to try select([col1, col2, col3]).select_from("scntest
AS OF SCN 123") , though that won't integrate with session.query()
unless you use from_statement().
I haven't seen that syntax before but it would otherwise have to be
added to the oracle dialect as a feature, such as select(....,
oracle_flashback="SCN 123").
I dont know what "AS OF" does but is it a syntactical substitute for
standard SQL ? I'd go with the standard SQL if possible.
On Jan 26, 2009, at 12:57 AM, botz wrote:
>
> Hi,
> I'm wondering if there's a way I can add a string to the tablename in
> a select query without affecting reflection, aliases, etc.
>
> Eg.
> given:
>
> t = Table( 'c1', column( 'c1', Integer, primary_key=True)
>
> I'd like to be able to generate:
>
> SELECT scntest.c1 AS scntest_c1 FROM scntest AS OF SCN 123
>
> maybe using something like
>
> session.query( t.from_append( "AS OF SCN 123" )).all()
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---