[sqlalchemy] python customer function

2015-05-07 Thread jo
Hi all, I would like to create a python customer function to extract data from a table column and return a calculated value as in: def birth(data): mm = dict(A='01',B='02',C='03',D='04',E='05',H='06',L='07',M='08',P='09',R='10',S='11',T='12') return '19'+data[6:8] +'-'+

Re: [sqlalchemy] sql custom function

2015-02-10 Thread jo
Hi Glauco, I'm glad to hear you. :-) Yes, you were right, I really forgot to register the function. I'll see you around. j Glauco wrote: Il 10/02/2015 09:33, jo ha scritto: Hi all, I can't realize how to create a sql custom function. I need to transform a string column value into a number

Re: [sqlalchemy] session query and column names

2015-01-13 Thread jo
table1.somelongcolumn AS table1_somelong_7. On Monday, January 12, 2015 at 3:09:22 PM UTC+3:30, jo wrote: Why don't you pass the params to session.query as a dictionary into filter_by as in: In [1]: by_where_clause=dict(specie_codice='42', specie_descrizione='Nutrie

Re: [sqlalchemy] DefaultClause

2015-01-09 Thread jo
Do you suggest to use server_default instead of DefaultClause in all cases? j Il giorno giovedì 8 gennaio 2015 15:17:20 UTC+1, Michael Bayer ha scritto: use server_default with text() as documented at http://docs.sqlalchemy.org/en/rel_0_9/core/defaults.html#server-side-defaults. jo

[sqlalchemy] DefaultClause

2015-01-08 Thread jo
Hi all, I have a problem with DefautClause. I need to assign a default to a numeric column. tbl['rischio_attivita'] = Table('rischio_attivita', database.metadata, Column('id', Integer, Sequence('rischio_attivita_seq'), primary_key=True), Column('cod_attivita',

[sqlalchemy] Re: can't adapt type 'KeyedTuple'

2014-11-21 Thread jo
Yes, it works, now! Thanks a lot, Jonathan j Il giorno giovedì 20 novembre 2014 19:35:03 UTC+1, Jonathan Vanasco ha scritto: SqlAlchemy returns column results as a `KeyedTuple`. It's similar to `collections.namedtuple` in the standard library Looking at your code, my guess is that you

[sqlalchemy] can't adapt type 'KeyedTuple'

2014-11-20 Thread jo
I all, I got a KeyedTuple error that I don't know what it means or how to solve it. Could anyone give me some help? Thanks. I'm using SQLAlchemy-0.9.3-py2.6.egg ProgrammingError: (ProgrammingError) can't adapt type 'KeyedTuple' 'SELECT unita_aziendale.id AS unita_aziendale_id,

Re: [sqlalchemy] Re: UNION howto

2014-10-02 Thread jo
It works. Thanks a lot, Jonathan. j Jonathan Vanasco wrote: I asked a similar question a few days ago; it's still on the front page of the group. Mike replied to that and gave some details Your query would be something like: class A(Base):

Re: [sqlalchemy] sqlite and max_overflow

2013-05-28 Thread jo
that keyword. On May 27, 2013, at 7:17 AM, jo jose.soa...@sferacarta.com mailto:jose.soa...@sferacarta.com wrote: I have not been able to solve the problem can someone please help me? ... database.bind_meta_data() File /home/jose/buildout/eggs/TurboGears-1.1.3-py2.6.egg/turbogears/database.py

Re: [sqlalchemy] sqlite and max_overflow

2013-05-28 Thread jo
for a line of the form sqlalchemy.max_overflow = X and delete it. Hope that helps, Simon On Tue, May 28, 2013 at 10:34 AM, jo jose.soa...@sferacarta.com wrote: Thanks for the tip, Michael, I'm going to see how to manage with this keyword (because I'm not specify such parameter, but probable

[sqlalchemy] Re: sqlite and max_overflow

2013-05-27 Thread jo
I have not been able to solve the problem can someone please help me? ... database.bind_meta_data() File /home/jose/buildout/eggs/TurboGears-1.1.3-py2.6.egg/turbogears/database.py, line 73, in bind_metadata metadata.bind = sqlalchemy.create_engine(dburi, **alch_args) File

[sqlalchemy] distinct on

2013-05-23 Thread jo
|Hi all, I wondered if it is possible to execute a partial distinct in sqlalchemy. The following query works in oracle and postgresql: select distinct col1, first_value(col2) over (partition by col1 order by col2 asc) from tmp; How can I do such query in sqlalchemy? Thanks for any help. j

[sqlalchemy] sqlite and max_overflow

2013-05-10 Thread jo
Hi all, I'm trying to use turbogears and sqlite as: sqlalchemy.dburi=sqlite:// but I got this error: TypeError: Invalid argument(s) 'max_overflow' sent to create_engine(), using configuration SQLiteDialect_pysqlite/SingletonThreadPool/Engine. Please check that the keyword arguments are

[sqlalchemy] A transaction is already begun. Use subtransactions=True to allow subtransactions.

2013-01-17 Thread jo
Hi all, I'm running an web application in turbogears1 using sqlalchemy I'm using mainly postgresql as database but in a few installations I'm using oracle (same programs only db change). Using PostgreSQL all is ok but when I use oracle some times I get the following error: File

Re: [sqlalchemy] maximum number of expressions in a list is 1000

2013-01-03 Thread jo
_tuple() is fine, Thanks Michael :-) j Michael Bayer wrote: On Jan 3, 2013, at 2:40 AM, jo wrote: Hi all, I need to use in_(), but in oracle it has a limit of 1000 values, there's an alternative syntax that can be used successful in oracle and it is: (field,-1) in ( (123,-1), (333,-1

[sqlalchemy] maximum number of expressions in a list is 1000

2013-01-02 Thread jo
Hi all, I need to use in_(), but in oracle it has a limit of 1000 values, there's an alternative syntax that can be used successful in oracle and it is: (field,-1) in ( (123,-1), (333,-1), ... ) I tryed this: session.query(Mytable).filter((Mytable.c.id,-1).in_([(123,-1),(333,-1)]) )

[sqlalchemy] NotSupportedError

2012-04-18 Thread jo
Hi all, Someone could help me with this query? SELECT MAX(CAST(SUBSTR(codice_aziendale, 2) AS INTEGER)) FROM azienda WHERE codice_aziendale LIKE '#%%' AND REGEXP_LIKE(SUBSTR(codice_aziendale, 2) , '[[:digit:]]') I'm trying in this way:

Re: [sqlalchemy] NotSupportedError

2012-04-18 Thread jo
database you're using. It's likely your DB doesn't support REGEXP_LIKE. On Apr 18, 2012, at 4:00 AM, jo wrote: Hi all, Someone could help me with this query? SELECT MAX(CAST(SUBSTR(codice_aziendale, 2) AS INTEGER)) FROM azienda WHERE codice_aziendale LIKE '#%%' AND REGEXP_LIKE(SUBSTR

Re: [sqlalchemy] query vs select

2012-04-13 Thread jo
'), ScadenzaMalattia.c.id_unita_aziendale == 2, ScadenzaMalattia.c.cod_malattia == '012')) On Apr 13, 2012, at 1:59 AM, jo wrote: Thanks Michael, your explanation is comprehensive, currently I'm using both of them, but I feared that one of them could become obsolete in the future

[sqlalchemy] query vs select

2012-04-12 Thread jo
Hi all, I'm sorry for this simple question. What's the difference between query and select ? are they interchangeable? which of the two, it is best to use? --- print(session.query(Azienda.c.data_inizio).limit(1)) SELECT azienda_data_inizio FROM (SELECT azienda.data_inizio AS

Re: [sqlalchemy] query vs select

2012-04-12 Thread jo
and can get back any combination of objects/tuples. I know it's not 100% pure but it does seem to work out pretty well. On Apr 12, 2012, at 2:06 PM, jo wrote: Hi all, I'm sorry for this simple question. What's the difference between query and select ? are they interchangeable? which

Re: [sqlalchemy] After insert/update events

2012-04-11 Thread jo
This is the way I solved the problem... (how to backup a table row into another table before delete or update it) ...if it can help: from sqlalchemy.orm import MapperExtension class History(MapperExtension): def __init__(self): MapperExtension.__init__(self) self.methods =

[sqlalchemy] datetime and engine

2012-03-30 Thread jo
Hi all, I found a difference between Oracle and PostgreSQL about datetime objects. Using the engine Oracle returns every date column as datetime.datetime while PostgreSQL returns it as datetime.date I have a table with a column data_inizio defined as DATE in table tariffa in my db. take a

Re: [sqlalchemy] datetime and engine

2012-03-30 Thread jo
shinriyo wrote: hi jo Oracle and PostgreSQL are different. Oracle also have hour and minutes and second. If you want minutes and second on PostgresQL, you should use datetime. Hi shinryo, I don't want hours and minutes. My problem is that I have a comparison in my code like

[sqlalchemy] sqlalchemy.exc.ArgumentError: Could not determine join condition between parent/child tables

2012-03-28 Thread jo
Hi all, I don't know how to fix this error in my model: sqlalchemy.exc.ArgumentError: Could not determine join condition between parent/child tables on relationship RuoloPermesso.permessi. Specify a 'primaryjoin' expression. If 'secondary' is present, 'secondaryjoin' is needed as well.

Re: [sqlalchemy] on delete cascade

2012-02-25 Thread jo
It works! Thanks a lot, Tate. j Tate Kim wrote: Hi, jo. At first, try with cascade option 'all, delete' (note that dropped 'delete-orphan'). Second, I've ever been your situation before, maybe -Original Message- From: jo jose.soa...@sferacarta.com Sender: sqlalchemy

[sqlalchemy] on delete cascade

2012-02-24 Thread jo
Hi all, I'm trying to delete cascade a linked row without success. Could anyone give me some help? This is my mapper: mapper(Azienda, tbl['azienda'], properties = { 'anagrafica': relation(Anagrafica, cascade='all, delete, delete-orphan'), }) the table Azienda

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
In cx_oracle mailing list, they suggested me, this: ... write your own equivalent of makedsn, which really ought not be too hard. You'd want to emit something like this:

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
I solved the problem using this monkeypatch to makedsn as suggested me by Christoph Zwerschke. makedsn = cx_Oracle.makedsn cx_Oracle.makedsn = lambda *args, **kw: makedsn(*args, **kw).replace('SID','SERVICE_NAME') Thaks any way to everyone. j Michael Bayer wrote: yeah I dunno, the

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
, which would then let you avoid generating the dsn in software -- craig Michael Bayer wrote: is that a known bug in cx_Oracle ? On Dec 16, 2011, at 4:45 AM, jo wrote: I solved the problem using this monkeypatch to makedsn as suggested me by Christoph Zwerschke. makedsn

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
Michael Bayer wrote: On Dec 16, 2011, at 10:31 AM, jo wrote: I don't know Michael, only that Craig Hagan in oracl...@freelists.org, suggested me this workaround... ...However, I'm pretty sure that the problem is that you're depending upon service names for your connection to succeed

Re: [sqlalchemy] sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

2011-12-16 Thread jo
', port = 1521, service_name = 'mydb') j On Dec 16, 2011, at 4:45 AM, jo wrote: I solved the problem using this monkeypatch to makedsn as suggested me by Christoph Zwerschke. makedsn = cx_Oracle.makedsn cx_Oracle.makedsn = lambda *args, **kw: makedsn(*args, **kw).replace('SID

[sqlalchemy] Postgres:TEXT and Oracle:CLOB

2011-02-17 Thread jo
Hi all, I have this definition of a table. session = Table('session', database.metadata, Column('id', Unicode(40), primary_key=True, nullable=False), Column('data', Text), Column('expiration_time', TIMESTAMP(timezone=False)), ) In the PostgreSQL DB, it

Re: [sqlalchemy] group by and Oracle

2010-12-05 Thread jo
Yes, Ian, it works, :-) thank you j Ian Kelly wrote: On Fri, Dec 3, 2010 at 4:08 AM, jo jose.soa...@sferacarta.com wrote: Hi all, I'm trying to write a GROUP BY query grouped by a function (to_char) using a variable format, which could be 'yy' or '' as in: sql=session.query

[sqlalchemy] group by and Oracle

2010-12-03 Thread jo
Hi all, I'm trying to write a GROUP BY query grouped by a function (to_char) using a variable format, which could be 'yy' or '' as in: sql=session.query( func.to_char(Prestazione.c.data,format), func.sum(Prestazione.c.quantita).label('quantita'),

Re: [sqlalchemy] CheckConstraint compatibility

2010-05-19 Thread jo
Michael Bayer wrote: On May 19, 2010, at 5:34 AM, jose soares wrote: Hi all, I have to create a constraint like this: CheckConstraint('data_start = CURRENT_DATE'), it works for PostgreSQL but it doesn't work for Oracle10. Is there some workaround to make it compatible with pg and

[sqlalchemy] select .group_by

2010-04-27 Thread jo
Hi all, In version 0.6 seems the group_by property does nothing... (Pdb) sql = select([Verifica.c.codice,func.sum(Prestazione.c.importo).label('importo')]) (Pdb) print sql SELECT verifica.codice, sum(prestazione.importo) AS importo FROM verifica, prestazione (Pdb)

Re: [sqlalchemy] select .group_by

2010-04-27 Thread jo
Lance Edgar wrote: On 4/27/2010 5:22 AM, jo wrote: Hi all, In version 0.6 seems the group_by property does nothing... (Pdb) sql = select([Verifica.c.codice,func.sum(Prestazione.c.importo).label('importo')]) (Pdb) print sql SELECT verifica.codice, sum(prestazione.importo) AS importo FROM

[sqlalchemy] about commit()

2010-04-23 Thread jo
Hi all, I need to insert a new row and get back the last inserted id, I have some difficulty using the flush(), then I'm trying with commit() but I can't understand how commit() works in 0.6. In the following script I try to update a row and it works properly but when I try to insert a new one,

Re: [sqlalchemy] flush(), save(), delete()

2010-04-22 Thread jo
King Simon-NFHD78 wrote: Jo wrote: [SNIP] and- In [13]: aa=Anagrafica.get(111) In [14]: aa.delete() In [15]: aa.flush() - but in version 0.6 I can't find

Re: [sqlalchemy] flush() again

2010-04-22 Thread jo
nd flushing it and then insert GestioneDocFile assigning CatalogazioneModulistica.numero_catalogo to GestioneDocFile.numero_catalogo_catalogazione ? j jo wrote: King Simon-NFHD78 wrote: Jo wrote: [SNIP]   and-

[sqlalchemy] column_prefix

2010-04-15 Thread jo
Hi all, Module sqlalchemy.engine.base:*1180* in |__execute_context ||context*.*parameters*[**0**]**,* context*=*context*)*| Module sqlalchemy.engine.base:*1249* in |_cursor_execute|| self*.*_handle_dbapi_exception*(*e*,* statement*,* parameters*,* cursor*,* context*)*| Module

[sqlalchemy] object has no attribute 'delete'

2010-04-13 Thread jo
Hi all, I'm trying migrate from 0.3 to 0.6 I don't know how to delete an object in the old version it was: My.get(1).delete() in 0.6: My.get(1).delete() AttributeError: 'My' object has no attribute 'delete' j -- Jose Soares Sferacarta Net Via Bazzanese 69 40033 Casalecchio di Reno

[sqlalchemy] cls._state / cls._state.get('original')

2010-04-13 Thread jo
Hi all, I cannot find anymore the attribute _state : if (not cls._state or not cls._state.get('original') or (cls._state['original'].data.get(k) != data.get(k: Could someone please help me? thank you j -- You received this message because you are subscribed to the Google Groups

Re: [sqlalchemy] object has no attribute 'delete'

2010-04-13 Thread jo
It works, thank you, Fernando. :-) j Fernando Takai wrote: Hi, You can try: My.query.filter_by(id=id).delete() (If your object can use the .query syntax) or session.query(My).filter_by(id=id).delete() On Apr 13, 2010 6:12 AM, jo jose.soa...@sferacarta.com mailto:jose.soa...@sferacarta.com

Re: [sqlalchemy] SQLAlchemy.func.max()

2010-04-09 Thread jo
Michael Bayer wrote: jose soares wrote: Michael Bayer wrote: jo wrote: I was using heavily the column_prefix and my code is full of it, as in: mapper(Anagrafica, tbl['anagrafica'], column_prefix = 'anagrafica_', extension=History

Re: [sqlalchemy] TypeError: unsupported operand type(s) for +: 'Decimal' and 'float'

2010-04-07 Thread jo
this is the 0.3 syntax, and now it works. class MyType(TypeDecorator): impl = Numeric def convert_bind_param(self, value, engine): return decimal.Decimal(str(value)) def convert_result_value(self, value, engine): return decimal.Decimal(str(value)) Thank you very much, Michael. :-) j jo wrote

[sqlalchemy] SQLAlchemy.func.max()

2010-04-07 Thread jo
Here another difference between Oracle and PostgreSQL The SQLAlchemy.func.max() on a column date, returns a datetime.date in pg but a datetime.datetime in oracle... Why this difference? take a look: Bolletta = Table('bolletta', database.metadata, Column('id', Integer, nullable=False,

Re: [sqlalchemy] SQLAlchemy.func.max()

2010-04-07 Thread jo
Michael Bayer wrote: jo wrote: Here another difference between Oracle and PostgreSQL The SQLAlchemy.func.max() on a column date, returns a datetime.date in pg but a datetime.datetime in oracle... Why this difference? Oracle doesn't have a "date" type.this

[sqlalchemy] identifier is too long

2010-03-30 Thread jo
Hi all, I have some troubles creating my db schema with Oracle. The problem is on this column: Column('cod_caratteristica_rischio', Unicode(10), index=True, nullable=False) It works fine in PostgreSQL but when I try it on Oracle sa tries to create an index with a name too long ( 30 char).

Re: [sqlalchemy] identifier is too long

2010-03-30 Thread jo
I see, thank you, Mariano. j Mariano Mara wrote: Excerpts from jo's message of Tue Mar 30 03:25:18 -0300 2010: Hi all, I have some troubles creating my db schema with Oracle. The problem is on this column: Column('cod_caratteristica_rischio', Unicode(10), index=True, nullable=False)

[sqlalchemy] ArgumentError: Only '='/'!=' operators can be used with NULL

2009-12-22 Thread jo
Hi all, I'm trying to solve this error... File /home/sfera/release/sicer/BASE/controller/controlli/sopralluogo.py, line 645, in verifiche Piano.c.data_inizio =data.get('data_sop') , File /usr/lib/python2.4/site-packages/sqlalchemy/sql.py, line 1294, in __le__ return self._compare('=', other)

Re: [sqlalchemy] ArgumentError: Only '='/'!=' operators can be used with NULL

2009-12-22 Thread jo
Mike Conley wrote: On Tue, Dec 22, 2009 at 2:34 AM, jo jose.soa...@sferacarta.com mailto:jose.soa...@sferacarta.com wrote: Hi all, I'm trying to solve this error... File /home/sfera/release/sicer/BASE/controller/controlli/sopralluogo.py, line 645, in verifiche

[sqlalchemy] self.data[i] index out of range

2009-11-07 Thread jo
Hia all, I'm dogged by this error for months, could someone, please, explain me what it means and how to avoid it. File /usr/lib/python2.4/site-packages/sqlalchemy/orm/attributes.py, line 532, in __getitem__ return self.data[i] IndexError: list index out of range thanks for any help.

[sqlalchemy] AttributeError: 'MetaData' object has no attribute 'engine'

2009-07-10 Thread jo
Hi all, I'm trying migrate from 0.3.10 to 0.4 and there's the following error: ... engine = database.metadata.engine AttributeError: 'MetaData' object has no attribute 'engine' I was reading the section 0.3 to 0.4 Migration of

[sqlalchemy] Re: changing instance identity

2009-05-21 Thread jo
state before flushing it? j On May 20, 2009, at 1:45 AM, jo wrote: Hello all, I have the following problem. While I'm working in my session, someone change my instance identity. I would like to avoid this. Is there a way to understand if was there any change before flushing

[sqlalchemy] Re: changing instance identity

2009-05-21 Thread jo
Glauco wrote: jo ha scritto: Michael Bayer ha scritto: that is your own application changing the primary key of a loaded instance, which is a feature very old versions of SQLAlchemy did not support. Upgrade to any recent version of 0.4 or 0.5 and you wont have

[sqlalchemy] Re: changing instance identity

2009-05-21 Thread jo
Michael Bayer wrote: On May 21, 2009, at 2:04 AM, jo wrote: Michael Bayer ha scritto: that is your own application changing the primary key of a loaded instance, which is a feature very old versions of SQLAlchemy did not support. Upgrade to any recent version of 0.4 or 0.5

[sqlalchemy] changing instance identity

2009-05-19 Thread jo
Hello all, I have the following problem. While I'm working in my session, someone change my instance identity. I would like to avoid this. Is there a way to understand if was there any change before flushing? This is the message: File

[sqlalchemy] Re: null() and notnull()

2009-03-20 Thread jo
Michael Bayer ha scritto: On Mar 19, 2009, at 12:34 PM, jo wrote: Michael Bayer wrote: why dont you just stick with None instead of nn ? then you just write: if v is None: clause.append(self.c.field != v) else: clause.append(self.c.field == v) It could

[sqlalchemy] null() and notnull()

2009-03-19 Thread jo
Hi all, I would like to know if there's a notnull() function in sqlalchemy similar to null() to avoid things like not_(null()) ? thank you j --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To

[sqlalchemy] Re: null() and notnull()

2009-03-19 Thread jo
: well usually null() and not_(null()) aren't needed as explicit constructs.comparisons like somecol == None and somecol != None will generate the appropriate NULL/NOT NULL expression. On Mar 19, 2009, at 4:48 AM, jo wrote: Hi all, I would like to know if there's a notnull

[sqlalchemy] Re: null() and notnull()

2009-03-19 Thread jo
)) that's 3 lines more .. svil On Thursday 19 March 2009 17:43:22 jo wrote: Well, MIchael, in my case a notnull() function could be very interesting because I'm using it in a function, and would like pass values as parameters in such way: def search( self, **kw ): by_where_clause

[sqlalchemy] Re: null() and notnull()

2009-03-19 Thread jo
) :-( and null() = IS NULL j On Mar 19, 2009, at 11:43 AM, jo wrote: Well, MIchael, in my case a notnull() function could be very interesting because I'm using it in a function, and would like pass values as parameters in such way: def search( self, **kw ): by_where_clause

[sqlalchemy] Re: MapperExtension before_update problem

2009-03-09 Thread jo
connections is likely creating a deadlock, and in any case violates the integrity of the transaction. On Mar 7, 2009, at 1:26 PM, jo wrote: Hi all, I have a strange behavior using MapperExtension before_update. I created two tables; anag and azi, azi have a foreign key to anag. When

[sqlalchemy] MapperExtension before_update problem

2009-03-07 Thread jo
Hi all, I have a strange behavior using MapperExtension before_update. I created two tables; anag and azi, azi have a foreign key to anag. When I try to change some column value on anag table the HistoryAnag.before_update is correctly triggered and it returns EXT_PASS, but when I try to change

[sqlalchemy] TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30

2009-02-17 Thread jo
Hi all, I wonder what this message mean: TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30 any ideas? jo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: DataError inserting CURRVAL in an inline query with SQLAlchemy and SQLSoup

2009-02-16 Thread jo
You cannot pass currval('users_user_id_seq') as a parameter value, you have to pass an integer value instead. I solved this problem in this way: INSERT INTO employees (employee_user_id, employee_id, employee_first_name, employee_last_name, employee_address, employee_city, employee_state,

[sqlalchemy] Re: sqlalchemy.exceptions.SQLError: (DatabaseError) ORA-00942: table or view does not exist

2009-01-04 Thread jo
Michael Bayer ha scritto: On Jan 2, 2009, at 11:51 AM, jo wrote: Seems SA checks if table already exist in all_tables system table... and creates it only if it doesn't exist. In my case... SQL select table_name from all_tables where table_name='FUNZIONE_CALCOLO', returns: TABLE_NAME

[sqlalchemy] sqlalchemy.exceptions.SQLError: (DatabaseError) ORA-00942: table or view does not exist

2009-01-02 Thread jo
) --- what's wrong ? jo ps: I'm using SA 0.3.10 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: sqlalchemy.exceptions.SQLError: (DatabaseError) ORA-00942: table or view does not exist

2009-01-02 Thread jo
, \n\tPRIMARY KEY (id), \n\t FOREIGN KEY(cod_funzione_calcolo) REFERENCES funzione_calcolo (codice)\n)\n\n' {} jo ha scritto: hi all, I'm having problems with database.metadata.create_all. The code works perfectly with PostgreSQL but with Oracle it doesn't...and it exits with the following

[sqlalchemy] Re: Variable_TypeByValue(): unhandled data type unicode

2008-12-12 Thread jo
azienda.id = :azienda_id ORDER BY azienda.rowid' {'azienda_id': u'1'} j On Dec 11, 2008, at 12:01 PM, jo wrote: Hi all, I'm using SA with cx_Oracle. In some queries it raises the following error: File /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py, line 581

[sqlalchemy] Re: Variable_TypeByValue(): unhandled data type unicode

2008-12-12 Thread jo
Michael Bayer ha scritto: On Dec 12, 2008, at 5:19 AM, jo wrote: Michael Bayer ha scritto: Look into using the Unicode type for python unicode values. http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html?highlight=unicode#sqlalchemy.Unicode This is the 0.5

[sqlalchemy] Re: Oracle sql syntax

2008-12-11 Thread jo
You are right, Michael, 1=0 works. thank you, j Michael Bayer ha scritto: I'd try 1 = 0 I dont think oracle has boolean keywords at least last I checked... On Dec 11, 2008, at 4:09 AM, jo wrote: Hi all, I'm trying sqlalchemy with Oracle. Seems Oracle doesn't understand

[sqlalchemy] Variable_TypeByValue(): unhandled data type unicode

2008-12-11 Thread jo
Hi all, I'm using SA with cx_Oracle. In some queries it raises the following error: File /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py, line 581, in _execute_raw self._execute(context) File /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py, line 599, in _execute

[sqlalchemy] Re: case_sensitive

2008-12-09 Thread jo
Maybe I'm using the 'case_sensitive' in a wrong way. Here what I want to reach : create unique index myname on mytable (lower(mycolumn)); How can I create it on sqlalachemy? j Glauco ha scritto: jo ha scritto: Hi all, Trying to migrate from 0.3.10 to 0.5 I have this error

[sqlalchemy] Column('last_updated', onupdate=func.current_timestamp())

2008-12-06 Thread jo
Hi all, I created a table with the following column: Column('last_updated', DateTime, PassiveDefault(func.current_timestamp ()), onupdate=func.current_timestamp()) Maybe I don't understand how onupdate works. I would like to have this column to be changed every time the row is updated, but it

[sqlalchemy] func.max()

2006-12-07 Thread jo
) assign_mapper(context, Bolletta, tbl['bolletta']) jo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send