Re: [Zope] Problem Inserting zsql query result

2005-11-15 Thread Chris Withers
Ivan Stout wrote: Yes, the full error message is the following: ProgrammingError: (1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0\n)' at line 9) Here is the select portion of the query I am

Re: [Zope] Problem Inserting zsql query result

2005-11-15 Thread Ivan Stout
Chris, I was preparing to reply to your e-mail when I discovered the problem. I had been assuming it was the query zsql method value that was the problem (due to the 0\n error), when it was actually a typo in the insert zsql method (I had failed to add a , when adding the additional field to

Re: [Zope] Problem Inserting zsql query result

2005-11-15 Thread Peter Bengtsson
Still an amazingly poor error message by your mysql. (perhaps time to upgrade to postgresql :) On 11/15/05, Ivan Stout [EMAIL PROTECTED] wrote: Chris, I was preparing to reply to your e-mail when I discovered the problem. I had been assuming it was the query zsql method value that was the

Re: [Zope] Problem Inserting zsql query result

2005-11-15 Thread Luca Olivetti
En/na Peter Bengtsson ha escrit: Still an amazingly poor error message by your mysql. (perhaps time to upgrade to postgresql :) Well, I just started tinkering with postgresql and already had my share of meaningless error messages ;-) And the Operational Error in psycopg 2.0b4 wasn't much

Re: [Zope] Problem Inserting zsql query result

2005-11-11 Thread Peter Bengtsson
On 11/11/05, Ivan Stout [EMAIL PROTECTED] wrote: Greetings, I would like to insert the results of a query into another table and am doing this from a python script. I am setting the results of a queryequal to a variable with the following: variable =

Re: [Zope] Problem Inserting zsql query result

2005-11-11 Thread Ivan Stout
Peter, Thank you, but unfortunately I still get the same error due to the newline character being there and still cannot remove it with variable.replace. Can a long object be converted to a string or integer some way? On 11/12/05, Peter Bengtsson [EMAIL PROTECTED] wrote: On 11/11/05, Ivan Stout

Re: [Zope] Problem Inserting zsql query result

2005-11-11 Thread Peter Bengtsson
What kind of a strange message is that? MySQL server version for the right syntax to use near '0\n)' Is that the ErrorValue? It can't be converted to a long or in because it contains a ) not because of the \n What's the SQL you're trying to use? (Only need to see the SELECT ... part) On

Re: [Zope] Problem Inserting zsql query result

2005-11-11 Thread Ivan Stout
Yes, the full error message is the following: ProgrammingError: (1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0\n)' at line 9) Here is the select portion of the query I am running: select count(*)