[sqlalchemy] Re: mssql func.cast error?

2007-05-29 Thread Michael Bayer
On May 29, 2007, at 11:48 PM, jjx wrote: > > mssql 2005+sp2 > test code > --- > > subject=Table('subject',metadata, > Column('subid',Unicode(18),primary_key=True), > Column('rest',Float), > Column('relevantid',Integer)) > print > sele

[sqlalchemy] Re: query.instances and select statement

2007-05-29 Thread Michael Bayer
On May 29, 2007, at 10:28 PM, Huy Do wrote: > s = select() > query = db.query(model.Invoice).options(contains_eager('client')) > query = query.from_select(s) # > query = query.limit(10).offset(10) > rs = query.list() > > What I'm doing, is pretty much setting up a query in one place of my > pr

[sqlalchemy] mssql func.cast error?

2007-05-29 Thread jjx
mssql 2005+sp2 test code --- subject=Table('subject',metadata, Column('subid',Unicode(18),primary_key=True), Column('rest',Float), Column('relevantid',Integer)) print select([func.cast(subject.c.relevantid,'varchar')]).execute().fetcha

[sqlalchemy] query.instances and select statement

2007-05-29 Thread Huy Do
Hi, I am currently doing the following query: s = select() query = db.query(model.Invoice).options(contains_eager('client')) rs = query.instances(s.execute()) I was wondering if it was possible to instead of query.instances(), just attached the select to the query object, then continue to mani

[sqlalchemy] - Very important: Repent, Completely trust in God only and, Love Him with all of your heart. Evolutionism is wrong.

2007-05-29 Thread Secret
There is a section below with the title "Atheism and Evolutionism are WRONG." All those who have sinned deserve to suffer in Hell forever. "Pride" is an example of a sin. 1. Repent (be truly sorry for your sins; beg for God's forgiveness; abandon sin; ask Him to help you stop sinning; and repent

[sqlalchemy] Re: sqlalchemy and running custom sql.

2007-05-29 Thread wongobongo
You mean something like this? K --- # Running a SQL Statement using SQLAlchemy from sqlalchemy import * dsn = 'mysql://root:[EMAIL PROTECTED]:3306/tester' # Create a database engine db = create_engine(dsn) # Do some SQL text("INSERT INTO insertable SELECT NULL,txt FROM test_table;", en

[sqlalchemy] Re: checking the sql string.

2007-05-29 Thread Michael Bayer
On May 27, 2007, at 4:23 PM, SamDonaldson wrote: > > How do I look to see what sql is being constructed in the query > object? So if I have something like: > > q = query.session(User) > q = q.add_column() > q = q.group_by(.).select() > > How do I check what sql string has been construct

[sqlalchemy] Sqlalchemy and py2exe...

2007-05-29 Thread pdamoc
Hello, I've tried packing an app I've made with py2exe and run into trouble... first it was an EGG issue, I've fixed that installing everything as a directory next came the sqlite issue... I simply cannot get it to work after I build the .exe I keep getting: Traceback (most recent call last):

[sqlalchemy] Problem on autoload with MS-SQL

2007-05-29 Thread Expo
With this code I get an error first time I autoload a table: from sqlalchemy import * import pydobc engine = create_engine('mssql://user:[EMAIL PROTECTED]/db', module=pyodbc) meta = BoundMetaData(engine) Table('table_x', meta, autoload=True) # << Get error first time Table('table_x', meta, au