Re: [sqlalchemy] Re: Sql alchemy-Oracle Error

2010-05-18 Thread dhanil anupurath
Hi SORRY for the delay to reply. Here is what my definitions. These are my class and table definitions: class Task(DeclarativeBase): task_id = Column(Integer,Sequence('id_ seq'), primary_key=True) task_type = Column(Unicode(50), default=to_unicode('Task')) name =

[sqlalchemy] Re: Sql alchemy-Oracle Error

2010-05-18 Thread dhanil anupurath
Hi task = Task(u'Task',\ {'quiet':False}, [], {}, None, u'admin') model.DBSession.merge(task) in my database the following query will try to select the above task object and result in error DBSession.query(TaskCalendar).options(eagerload('task')).\

[sqlalchemy] Re: declarative + order_by of 2 columns: is it possible?

2010-05-18 Thread sandro dentella
Hi, On 11 Mag, 18:23, sandro dentella san...@e-den.it wrote: Hi, i have a working declarative configuration that has a relation as this:: client = relation(Cliente, backref='jobs' , lazy=False, order_by=status.desc) now I'd like to add a second column in the order_by field but adding

[sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Kent
Ignore everything below unicode_for_unicode = False for Oracle lower than 9? in previous post, I meant to delete those lines -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To

[sqlalchemy] Re: is sqlalchemy-migrate the right way to go?

2010-05-18 Thread Don Dwiggins
This thread is of interest to me as well, although the problem I'm facing is somewhat different. Just to expand the space a little, here's my situation: - A legacy database schema with hundreds of tables and procedures. - An application that accesses the database, with occasional updates

Re: [sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Michael Bayer
On May 18, 2010, at 11:31 AM, Kent wrote: cx_Oracle-5.0.2 This is what is causing the error: === SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL * ERROR at line 1: ORA-12704:

[sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Kent
SELECT CAST('test unicode returns' AS NVARCHAR(60)) AS anon_1 FROM DUAL then it seems like either that fails directly, or it fails when the client gets a hold of it.   See what happens with that statement.   Not sure that Oracle 8 has NVARCHAR which might be the issue. Please see the

[sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Kent
Oops, my bad, I didn't notice you that statement changed NVARCHAR2 to NVARCHAR: Here is that result: = SQL SELECT CAST('test unicode returns' AS NVARCHAR(60)) AS anon_1 FROM DUAL 2 ; SELECT CAST('test unicode returns' AS NVARCHAR(60)) AS anon_1 FROM DUAL

Re: [sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Michael Bayer
Sorry, I meant NVARCHAR2. SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL works ? or no ? On May 18, 2010, at 12:17 PM, Kent wrote: Oops, my bad, I didn't notice you that statement changed NVARCHAR2 to NVARCHAR: Here is that result:

Re: [sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Kent Bower
No, this is what was causing ORA-12704: character set mismatch: SQL SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL; SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL * ERROR at line 1: ORA-12704: character set mismatch On

[sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Kent
There is a fairly short Oracle-published white paper on Unicode support here: http://www.oracle.com/technology/tech/globalization/pdf/TWP_AppDev_Unicode_10gR2.pdf It does state that starting with Oracle7 there was Unicode support and lists a table of Oracle version, Character set and Unicode

[sqlalchemy] Re: Is multi-level polymorphism possible in SQLAlchemy?

2010-05-18 Thread Michael Bayer
Don't use None for the Column type (i.e., detected as the null type). Put the type explicitly. This has been updated in the documentation recently since the None feature can't be fully supported at this time. On May 18, 2010, at 1:34 PM, Kiran Jonnalagadda wrote: Is it possible to

[sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Kent
It specifically says NCHAR is not usable *for unicode* until Oracle 9i. (Showing my ignorance here: are you certain NVARCHAR2 uses NCHAR? Seems logical to me.) The white paper further states: No Unicode character set is supported as the national character set prior to Oracle 9i. I believe the

Re: [sqlalchemy] Re: sqla 0.6.0 with oracle 8 (ORA-00907: missing right parenthesis)

2010-05-18 Thread Michael Bayer
latest patch - also try not specifiying use_ansi=False, it should detect that now On May 18, 2010, at 2:04 PM, Kent wrote: It specifically says NCHAR is not usable *for unicode* until Oracle 9i. (Showing my ignorance here: are you certain NVARCHAR2 uses NCHAR? Seems logical to me.)

[sqlalchemy] default value in multiple insert

2010-05-18 Thread Dan K
I found a similar thread from about a year ago (http:// groups.google.com/group/sqlalchemy/browse_thread/thread/ 66ef04fd10fd2be/ec7784b70abedabe), but it never seemed to answer the most burning question: is there a way in sqlalchemy to do a multiple insert with default values for unspecified

Re: [sqlalchemy] Re: Sql alchemy-Oracle Error

2010-05-18 Thread Michael Bayer
attached is a test program that is of a format which allows us to be able to answer your questions quickly. It is a short test program that runs fully, using the model fragments you've sent along. It does not reproduce your error. Instead, it appears that the is not an operator accepted

Re: [sqlalchemy] default value in multiple insert

2010-05-18 Thread Michael Bayer
not sure what the question is - how to use server-side defaults ?Column accepts a server_default keyword for this purpose.You leave the key out of the columns dictionary for those columns where you want the server_default to fire off. if the question is, I want to multiple insert like

Re: [sqlalchemy] default value in multiple insert

2010-05-18 Thread Dan Kuebrich
My apologies; I expressed my question rather incoherently. if the question is, I want to multiple insert like [{'a':1, 'b':2, 'c':3}, {'a':2}, {'a':3, 'b':4}], etc. only some dictionaries are missing different keys, that is not allowed. The structure of the SQL statement as parsed by MySQL