[sqlalchemy] startswith operator Oracle

2010-04-21 Thread Grimsqueaker
It looks as though SQLAlchemy doesn't use the startswith() operator properly in Oracle (using SA 0.6). col1.startswth(col2) gives me col1 LIKE col2 + '%%' which should be col1 LIKE col2 || '%%' . Am I doing something wrong or should this be reported? Thanks -- You received this message

[sqlalchemy] Re: Oracle DATE column reflection

2010-03-14 Thread Grimsqueaker
Thanks, I understand the reasoning behind this and appreciate the fix to make it work as expected for Oracle. btw I really like the way types and dialects work in 0.6. On Mar 11, 5:31 pm, Michael Bayer mike...@zzzcomputing.com wrote: Grimsqueaker wrote: When I use autoload=True to reflect

[sqlalchemy] Oracle DATE column reflection

2010-03-11 Thread Grimsqueaker
When I use autoload=True to reflect an Oracle table with a DATE column containing a full date and time, the resulting python object is a datetime.date, not datetime.datetime. Before updating to SA 0.6 I used to get a datetime.datetime as expected. If I override the reflected column with the

[sqlalchemy] Re: Oracle DATE column reflection

2010-03-11 Thread Grimsqueaker
I forgot to mention this old post which seems to mention this exact problem, maybe it is related. http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg06619.html On Mar 11, 4:04 pm, Grimsqueaker grimsqueake...@gmail.com wrote: When I use autoload=True to reflect an Oracle table with a DATE

[sqlalchemy] table reflection tometadata()

2010-03-08 Thread Grimsqueaker
I am trying to reflect a table from a database and use table.tometadata() to copy it into an identical database. This usually works, but when I try to call table.create() on a certain new table, I get a ProgrammingError. I can see that this may be due the fact that the server_default on one of the

[sqlalchemy] Re: table reflection tometadata()

2010-03-08 Thread Grimsqueaker
Thanks, I should have tried that first - it works perfectly in 0.6. On Mar 8, 4:42 pm, Michael Bayer mike...@zzzcomputing.com wrote: Grimsqueaker wrote: I am trying to reflect a table from a database and use table.tometadata() to copy it into an identical database. This usually works

[sqlalchemy] use of a column label in HAVING clause

2009-04-23 Thread Grimsqueaker
I dont understand what I'm doing wrong in the following situation. If I put this: case(whens={exclude_table.c.minutes_limit != None: exclude_table.c.minutes_limit}, else_=5000).label (name='minutes_limit') in the select clause of my query, I can't say: having=(func.sum(cdr_table.c.duration)

[sqlalchemy] Re: generative queries

2008-09-17 Thread Grimsqueaker
Im using 0.4.5, is this feature only available in 0.5? On Sep 16, 4:02 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Sep 16, 2008, at 3:51 AM, Grimsqueaker wrote: I'm having some trouble using generative queries. In my case, I want to compile a query and then add further from (join

[sqlalchemy] bulk insert

2008-04-24 Thread Grimsqueaker
Hi, I'm new to this group - here's my question, I've been fighting with this for a while now I need to insert a list of lists into a database. It works using a for loop but this is very slow so I want to optimize it. The method of bulk inserting in SQLAlchemy is much faster but only seems to