select * frome tablename where time between 的有关问题
select * frome tablename where time between 的问题C# codestring strsql select * for tablename wh
select * frome tablename where time between 的问题
C# codestring strsql = "select * for tablename where 网上申报时间 between '" + TextBox2.Text + "' and '"+ TextBox3.Text +"'";
这句话有问题吗?
[解决办法]for -> from
[解决办法]Between 的是时间值而不是字符串 ,最好转换下
[解决办法]有什么问题,放到查询分析器或代码中试试
[解决办法]单引号好像不需要把。都是字符类型的拼接
[解决办法][解决办法]两个text分别是什么
[解决办法]C# codestrsql = "select * form tablename where 网上申报时间 between convert(datetime,'" + TextBox2.Text + "') and convert(datetime,'"+ TextBox3.Text +"')"