On 25-10-2006, Janice Sterling wrote:
> --===============0689749057==
> Content-Type: multipart/alternative; 
>       boundary="----=_Part_18939_12219789.1161749671700"
>
> ------=_Part_18939_12219789.1161749671700
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> I am trying to use a sql query where i'm passing a parameter
>
> sql_str = "SELECT mrc_code FROM blocks where mrc_code LIKE '%s'" % (blkfld)
>
> where blocks would be 31103a1, 31103e1, 31103a5, 31103e5

you want to do 

select mrc_code from blocks where mrc_code in ('31103a1', '31103e1', 
'31103a5', '31103e5')

isnt'it ?

-- 
William Dodé - http://flibuste.net

_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to