日期:2014-05-18  浏览次数:20531 次

如何转换代码?
我在SQL 2005里面写的语句
C# code

 str = "select *,ROW_NUMBER() over(order by TimeST) ROWID into temp" + k + " from " + TName2[k] + " where TimeST <'" + dateTime.ToString() + "'";
         str += "select * from temp"+k+" where ROWID between 0 and 200";



如何转换为SQL2000语句

------解决方案--------------------
str="select *,ROWID=(select count(1) from "+TName2[k]+" where t.id<id) into temp"+k+" from "+Tname2[k]+" t where TimeST <'" + dateTime.ToString() + "'";
str += "select * from temp"+k+" where ROWID between 0 and 200";