[sqlalchemy] Re: invalid byte sequence for encoding:utf8 Postgresql

2008-02-14 Thread [EMAIL PROTECTED]
Solvedmy faultthe file i'm reading was latin1... and I was using the standard open.. now I use: self.in_file = codecs.open(self.filename, r, latin1) after that it worked fine... thanks On 13 Feb, 16:50, Michael Bayer [EMAIL PROTECTED] wrote: On Feb 13, 2008, at 2:28 AM, [EMAIL PROTECTED]

[sqlalchemy] Re: pymssql delete problem

2008-02-14 Thread fw
Thanks, That seems to solve the problem. Cheers, François Rick Morrison wrote: Thanks for your continuing interest in my silly problem It's not a silly problem, it's a important fundamental operation that ought to work correctly! Try the attached patch against pymssql 0.8.0.

[sqlalchemy] How to load a complex data set into an SA aware object?

2008-02-14 Thread Jorge Vargas
Hi, I'm working on a project where I got several read only tables that are dependent on a third-party, I got several vainlla SQL queries to get the data I need of them and I was wondering which will be the best way to load them up into SA. The queries themselfs are quite complex with several

[sqlalchemy] Re: schema changes

2008-02-14 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Withers Sent: 13 February 2008 13:51 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: schema changes Michael Bayer wrote: What if they exist but don't match the spec

[sqlalchemy] Re: pymssql delete problem

2008-02-14 Thread Rick Morrison
In other news, pyodbc on Unix is alive again, thanks to the surprise revelation that it actually can work, and shows a similar test profile to running it on Windows. Stay tuned... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Michael Bayer
so, does somebody want to add EXEC to the is_select() regexp ? I think we should also add a flag to text() which allows this too, along the lines of returns_results=True. On Feb 13, 2008, at 4:50 PM, Paul Johnston wrote: John, I am using unixodbc-2.2.11 as packaged by Ubuntu 7.10

[sqlalchemy] Re: How to load a complex data set into an SA aware object?

2008-02-14 Thread jason kirtland
Jorge Vargas wrote: Hi, I'm working on a project where I got several read only tables that are dependent on a third-party, I got several vainlla SQL queries to get the data I need of them and I was wondering which will be the best way to load them up into SA. The queries themselfs are

[sqlalchemy] Re: version_id_col question

2008-02-14 Thread Michael Bayer
On Feb 14, 2008, at 10:19 AM, Jonathan LaCour wrote: I'd like to automatically enable the SQLAlchemy concurrent modification checking on versioned mappers using the `version_id_col` argument, but the documentation isn't clear on how it works. Is this column managed by SQLAlchemy or is it

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Rick Morrison
Sure, I'll take care of it. Is there an easy way to side-step things like columns named 'exec', or is that just a risk we take? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group,

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Michael Bayer
the regexp is \s*(keywords) so it should only match EXEC as the first thing in the string. is the EXEC the only way to call an SP in MS-SQL ? no SELECT procname ? On Feb 14, 2008, at 12:05 PM, Rick Morrison wrote: Sure, I'll take care of it. Is there an easy way to side-step things

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Rick Morrison
Only rarely is there only one way to do something in MSSQL ;-) Stored procedures can also be called simply by name, omitting the EXEC: EXEC procedure_foo parms or procedure_foo parms and I believe they can also be called from within a subquery: select * from

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Rick Morrison
This approach would be ideal, and would work with row-returning functions, etc. but obviously depends on some rather sophisticated cooperation with the dbapi. I don't think pymssql would be up to the task, although I think the ODBC-derived dbapis might work. On Thu, Feb 14, 2008 at 12:11 PM,

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Rick Morrison
I think we should also add a flag to text() which allows this too, along the lines of returns_results=True. +1 on that, it would be useful as a fallback for those oddball situations. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread John Keith Hohm
Stored procedures can also be called simply by name, omitting the EXEC: EXEC procedure_foo parms or procedure_foo parms True, but as you suggested it's hardly a burden to type the EXEC. and I believe they can also be called from within a subquery: select *

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread John Keith Hohm
I think we should also add a flag to text() which allows this too, along the lines of returns_results=True. +1 on that, it would be useful as a fallback for those oddball situations. Indeed, Microsoft SQL Server interprets myriad bespoke SQL constructs which return results. Perhaps the

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread jason kirtland
Michael Bayer wrote: so, does somebody want to add EXEC to the is_select() regexp ? I think we should also add a flag to text() which allows this too, along the lines of returns_results=True. There was some talk of trying to auto-detect resultsets with cursor inspection. My recollection

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Don Dwiggins
Rick Morrison wrote: Only rarely is there only one way to do something in MSSQL ;-) Stored procedures can also be called simply by name, omitting the EXEC: EXEC procedure_foo parms or procedure_foo parms True, as long as the call is the first statement in the

[sqlalchemy] Re: version_id_col question

2008-02-14 Thread Jonathan LaCour
Michael Bayer wrote: its managed entirely by SQLAlchemy at the moment, starts at 1 and increments automatically, and acutually doesnt have any connection to class-based attributes so its a little insular. I would think that elixir could just move its own management of the version over to

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread jason kirtland
Rick Morrison wrote: This approach would be ideal, and would work with row-returning functions, etc. but obviously depends on some rather sophisticated cooperation with the dbapi. I don't think pymssql would be up to the task, although I think the ODBC-derived dbapis might work. It's not

[sqlalchemy] 0.3.x eagerload error

2008-02-14 Thread Matt
I'm having some trouble configuring eager loading for a query: Query: domainq = ctx.current.query(Domain).options(eagerload('company')).all() Mapper: domainmapper = mapper(Domain, domains, extension=ModifiedMapper(), properties={ 'company' : relation(Company, uselist=False), } )

[sqlalchemy] now() function + MSSQL

2008-02-14 Thread Rick Morrison
Hey I noticed just now when I was updating the CHANGES file that MSSQL should be included in the generic func.now() -- CURRENT_TIMESTAMP group. that's in r4161 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: 0.3.x eagerload error

2008-02-14 Thread Michael Bayer
On Feb 14, 2008, at 12:48 PM, Matt wrote: I'm having some trouble configuring eager loading for a query: Query: domainq = ctx.current.query(Domain).options(eagerload('company')).all() Mapper: domainmapper = mapper(Domain, domains, extension=ModifiedMapper(), properties={

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-14 Thread Rick Morrison
And support procedures returning multiple resultsets in general. That would be great, although I think such things are pretty poor form. Years ago I worked on a legacy system that had a calc procedure returning 20+ result sets, and a variable number of them at that. What a nightmare that was

[sqlalchemy] Re: How are Oracle IDs generated?

2008-02-14 Thread Michael Bayer
On Feb 14, 2008, at 6:01 PM, Waldemar Osuch wrote: On Feb 14, 2:06 pm, Richard Jones [EMAIL PROTECTED] wrote: On Feb 14, 5:13 pm, Waldemar Osuch [EMAIL PROTECTED] wrote: On Feb 13, 8:03 pm, Richard Jones [EMAIL PROTECTED] wrote: Thanks, I should have been clearer: how is ID generation