Re: Variable argument list for IN clause

Oswaldo Hernández <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
Oswaldo Hernández escribió:
> Hello,
...
> 

Sorry, i have a silly day :)

The solution is put the the args tuple as a simple parameters:

 >>> INparams = ("a", "b", "c")
 >>> SQL = "select 'a' in %s"
 >>> c.execute(SQL, (INparams,))
 >>> c.fetchall()
[(True,)]


Regards.
-- 
*****************************************
Oswaldo Hernández
oswaldo (@) soft-com (.) es
*****************************************
PD:
Antes de imprimir este mensaje, asegúrese de que es necesario.
El medio ambiente está en nuestra mano.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.