Well jchang, I am not exacly sure where the problem is ,but can u check on the following syntax in your code... Hope it helps
In the main code where u call this function
isExists(fxfcustid) is actually supposed to be "IsExists(fxfcustid)"
functions are case sensitive...But if you are not facing a problem here, maybe the next one could be bothering...
I have never used three ' ' ' ( and I have no idea how it works)
In your code
sql = '''select count(*)
from triumph.fxf_salescontest_entry
where fxf_acct_nbr = %(fxfcustid)s)
and (delete_flag is null or
delete_flag not in ('Y','y')) ''' % vars()
Here 'fxcustid' seems to be caught within the string, I mean it has become a part of the string... why dont u try
sql = "select count(*) from triumph.fxf_salescontest_entry where fxf_acct_nbr = %(" + fxfcustid + ")s) and (delete_flag is null or delete_flag not in ('Y','y'))" % vars()
I have very little knowledge in SQL Queries, I dont know whether the above syntax is right, hope it helps you in some way...
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
Offline 52 posts
since Aug 2005