Re: when i use sum() in my sql, my code will be ORA-00907

千樱硕 <[email protected]> Tue, 18 Aug 2015 01:32:32 +0000
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <[email protected]>
Thank you. I check my sql (the self.__dtlSql) and i find the error. when i link str from tow row in code. i forget the blank.

Date: Mon, 17 Aug 2015 14:03:35 +0800
From: [email protected]
To: [email protected]
Subject: Re: [cx-oracle-users] when i use sum() in my sql,	my code will be ORA-00907

yes looks like the syntax err. 

-thanks,
suse

2015-08-15 22:47 GMT+08:00 Anthony Tuininga <[email protected]>:
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 <[email protected]> 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

[email protected]

https://lists.sourceforge.net/lists/listinfo/cx-oracle-users





------------------------------------------------------------------------------


_______________________________________________

cx-oracle-users mailing list

[email protected]

https://lists.sourceforge.net/lists/listinfo/cx-oracle-users




-- 
Regards,
-suse


------------------------------------------------------------------------------
_______________________________________________
cx-oracle-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users

------------------------------------------------------------------------------

_______________________________________________
cx-oracle-users mailing list
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users