-2

WHEREこれに条件を追加するにはどうすればよいですか。

sqlcmd = new SqlCommand("SELECT A.* from Experiment A INNER JOIN
             (SELECT ROW_NUMBER() OVER(ORDER BY AutoID ASC) AS 'RN', "+
             "*FROM Experiment) B ON A.AutoID= B.AutoID AND B.RN 間
             11および21 "、詐欺);

完全なコードは次のとおりです。

protected void Page_Load(object sender, EventArgs e)
{

    if (!IsPostBack)
    {
      // sqlcmd = new SqlCommand("Select *From Experiment", con);
     sqlcmd = new SqlCommand("SELECT A.* from Experiment A INNER JOIN (SELECT ROW_NUMBER() OVER(ORDER BY AutoID ASC) AS 'RN', "+
       "*FROM Experiment) B  ON A.AutoID= B.AutoID AND B.RN between 11 and 21 ", con);


        adapter = new SqlDataAdapter(sqlcmd);
        DataSet ds = new DataSet();
        con.Open();
        adapter.Fill(ds, "Experiment");
        Repeater1.DataSource = ds;
        Repeater1.DataBind();
     }   
}
4

2 に答える 2

0
sqlcmd = new SqlCommand("SELECT A.* from Experiment A INNER JOIN (SELECT ROW_NUMBER() OVER(ORDER BY AutoID ASC) AS 'RN', "+ "*FROM Experiment) B ON A.AutoID= B.AutoID AND B.RN between 11 and 21 " + "WHERE ......", con);
于 2013-05-11T08:23:53.443 に答える