On 6/1/15 11:19 AM, Ranjith wrote:
I would like create table as select statement

http://www.postgresql.org/docs/8.1/static/sql-createtableas.html

OK but also you want to use bound parameters, apparently. I've answered the question at http://stackoverflow.com/a/30577608/34549.





On 1 June 2015 at 20:48, Mike Bayer <mike...@zzzcomputing.com <mailto:mike...@zzzcomputing.com>> wrote:



    On 6/1/15 9:39 AM, Ranjith Ramachandra wrote:
    I am using sqlalchemy's core features do write some abstraction
    layer. The layer itself needs to be able to create tables from
    select statements.

    Sample code:

      metadata = MetaData(bind=engine)
      table = Table(table_name, metadata, autoload=True,
    autoload_with=engine)
      s = select(table).where(table.c.column_1 > 10)

    Now what I want to be able to is create a new table from the
    select statement above. How can I do it?
    can you be more specific?  What DDL would you like to emit ?






-- You received this message because you are subscribed to the
    Google Groups "sqlalchemy" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to sqlalchemy+unsubscr...@googlegroups.com
    <mailto:sqlalchemy+unsubscr...@googlegroups.com>.
    To post to this group, send email to sqlalchemy@googlegroups.com
    <mailto:sqlalchemy@googlegroups.com>.
    Visit this group at http://groups.google.com/group/sqlalchemy.
    For more options, visit https://groups.google.com/d/optout.

-- You received this message because you are subscribed to a topic in
    the Google Groups "sqlalchemy" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/sqlalchemy/lKDkX68fOqI/unsubscribe.
    To unsubscribe from this group and all its topics, send an email
    to sqlalchemy+unsubscr...@googlegroups.com
    <mailto:sqlalchemy+unsubscr...@googlegroups.com>.
    To post to this group, send email to sqlalchemy@googlegroups.com
    <mailto:sqlalchemy@googlegroups.com>.
    Visit this group at http://groups.google.com/group/sqlalchemy.
    For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com <mailto:sqlalchemy+unsubscr...@googlegroups.com>. To post to this group, send email to sqlalchemy@googlegroups.com <mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to