日期:2014-05-17 浏览次数:20995 次
string strsql = "select c.id from tb_c c inner join tb_x x ON c.id=x.id where c.id in ({0}) ";
List<string> listQuery=new list<string>();
//假设listQuery 有5条记录
//每条存放1000个id;(如111,222,333,444,555,666)
DataTable dt= new DataTable();
foreach (string strQuery in listQuery)
DataAccess.Query(String.Format(strsql, strQuery), dt2);
foreach (DataRow dr in dt.Rows)
{
//xxxxxxxxxxxxx
}
public static void Query(string strSQL, DataTable dt)
{
OracleConnection conn = new OracleConnection(connectstring);
conn.Open();
OracleDataAdapter adaper = new OracleDataAdapter(strSQL, conn);
adaper.Fill(dt);
conn.Close();
}
string strsql = @"select c.id from tb_c c inner join tb_x x ON c.id=x.id,
TABLE(getidtable('{0}',',')) B where c.id =B.COLUMN_VALUE";";
CREATE OR REPLACE TYPE table_id IS TABLE OF integer;
create or replace function GetIDTable(p_ID clob,
p_split char) return table_id
pipelined is
v_LEN int; --字符串长度