时间类型用between好像不包括两端的吧

解决方案 »

  1.   

    可以通过DataRow来得到:
    DataRow[] dr = objDataView.Table.Select( "your condition" );
      

  2.   

    当时间为'2003-10-13 16:00:00:00'的success_num数据有两个,
    当时间为'2003-10-13 17:00:00:00'的success_num数据有三个,
    在SQL事件分析器里执行上面的SQL语句后,在SQL事件分析器里的结果是这样的:
    datetime                  success_num
    2003-10-13 16:00:00:00    6.0
    2003-10-13 16:00:00:00    7.0
    avg
    6.5
    datetime                  success_num
    2003-10-13 17:00:00:00    1.0
    2003-10-13 17:00:00:00    2.0
    2003-10-13 17:00:00:00    3.0
    avg
    2.0
    可是在页面上的datagrid里只显示了:
    datetime                  success_num
    2003-10-13 16:00:00:00    6.0
    2003-10-13 16:00:00:00    7.0这是怎么回事啊?
    另外,我如何得到
    avg
    6.5
    datetime                  success_num
    2003-10-13 17:00:00:00    1.0
    2003-10-13 17:00:00:00    2.0
    2003-10-13 17:00:00:00    3.0
    avg
    2.0
    这些数据啊???
      

  3.   

    DataRow[] dr = objDataView.Table.Select( "your condition" );
    这里的"your condition"写什么呢?
    比如我想得到
    avg
    6.5
    难道我写:"avg(success_num)"?
    这样好象不行啊。
      

  4.   

    我自己顶一下啦
    help me!!!
      

  5.   


    可是那怎么获得
    avg
    6.5
    这个值呢?
      

  6.   

    没法做的...compute是做报表用的..
      

  7.   

    你一个表一个表地读过来,就可以了。
    如:
    string strDS;
    //Get data from the first table in the collection
    foreach(DataRow myRow in dtc["table1"].Rows)
    {
    strDS = myRow[0].ToString();
    strDS = myRow[1].ToString();
    }
    //Get data from the second table in the collection
    foreach(DataRow myRow in dtc[1].Rows)
    {
    strDS = myRow[0].ToString();
    }
    //Get data from the third table in the collection
    foreach(DataRow myRow in dtc[2].Rows)
    {
    strDS = myRow[0].ToString();
    strDS = myRow[1].ToString();
    }
    //Get data from the fourth table in the collection
    foreach(DataRow myRow in dtc[3].Rows)
    {
    strDS = myRow[0].ToString();
    }