select * from VENTURE.VW_RESULT_2000010 where (currency_code = '0' ) and tradedate between '20050301' and '20050310' and branch_code='0210'
对以上sql语句要实现参数化该怎么办?
我知道如果where后面只有branch_code='0210'一个条件时可以用
pre = "select * from VENTURE.VW_RESULT_2000010 where branch_code= ";
id =0210;
strQuery = pre & id;
但是现在后面有好几个条件,如果要把20050301,20050310与0210一起都参数化,该怎么办呢?
sqlstr="select * from VENTURE.VW_RESULT_2000010 where currency_code = '0' ) and tradedate between '" ¶meter1& "' and '"¶meter2& "' and branch_code='"¶meter3& "'";