Re: [cx-oracle-users] when i use sum() in my sql, my code will be ORA-00907
Brought to you by:
atuining
|
From: Suse S. <sin...@gm...> - 2015-08-17 06:03:44
|
yes looks like the syntax err.
-thanks,
suse
2015-08-15 22:47 GMT+08:00 Anthony Tuininga <ant...@gm...>:
> Hi,
>
> It looks like the omitted code is rather important....as the last line you
> keep talks about __midSql but the line that actually errors talks about
> __dtlSql. Take a look at __dtlSql -- there will be a syntax error in your
> SQL there. :-)
>
> Anthony
>
> On Sat, Aug 15, 2015 at 2:00 AM, 地铁怪0 <196...@qq...> wrote:
>
>> Hi all:
>> This is my first time to use cx_Oracle, i get a problem,
>>
>> - This is my code:
>>
>> --omit--
>> self.__midSql = "select sum(primal_fee) from ad.ca_daily_bill"
>> self.__db = cx_Oracle.Connection(self.__user, self.__passwd,
>> self.__dns)
>> self.__cursor = self.__db.cursor()
>> self.__cursor.execute(self.__midSql)
>> --omit--
>>
>>
>>
>> - and the error:
>>
>> Traceback (most recent call last):
>> File "check_daily_bill_1.4.py", line 293, in <module>
>> query_DB.dailyQueryFromDB()
>> File "check_daily_bill_1.4.py", line 281, in dailyQueryFromDB
>> self.__cursor.execute(self.__dtlSql)
>> cx_Oracle.DatabaseError: ORA-00907: missing right parenthesis
>>
>> Sorry for my omit , i should keep secret for my customer. The code
>> is copy from my real code, i just change the table_name.
>> and my table_name do not contain a "(" or ")" .
>> I don't omit the error message. that is all.
>> the last, sorry for my english, if you know how to deal this
>> error, please tell me, thanks for your help!
>>
>> Best Wishes For You
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> cx-oracle-users mailing list
>> cx-...@li...
>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> cx-oracle-users mailing list
> cx-...@li...
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>
>
--
Regards,
-suse
|