Hi thank for all your answers !!
It was kind of my first python script so i'm open to fix it to optimize my code.
James is right i'm using cx_Oracle for my connection.
Here what my sql query look likes
SELECT * FROM INTERVENTIONS_GEO_UNITES WHERE TYPE_INT <> '1ERREP' and DATE_INTER BETWEEN TO_DATE('01/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS') AND TO_DATE('12/31/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS') and ARRONDISSEMENT_VILLE in ('Côte-des-Neiges--Notre-Dame-de-Grâce','Plateau-Mont-Royal','Outremont')
or if it with rdc here my query pratically the same except they add a suffix RDC at the view name.
SELECT * FROM INTERVENTIONS_GEO_UNITES_RDC WHERE TYPE_INT <> '1ERREP' and DATE_INTER BETWEEN TO_DATE('01/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS') AND TO_DATE('12/31/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS') and ARRONDISSEMENT_VILLE in ('Côte-des-Neiges--Notre-Dame-de-Grâce','Plateau-Mont-Royal','Outremont')
What I don't understand is that i can execute the script without any problems when I don't have the condition True or False with this code
sql = "SELECT * FROM INTERVENTIONS_GEO_UNITES WHERE " + arg1
cursor.execute(sql)
rows = cursor.fetchall()
I'll try the differents options that you guys gave me and come back for the feedback of my tests
Thanks you