delphi中的SQL生日查询:从表shengri中查询一段时间内的生日员工。开始日期datetimepicker1设定
结束日期由datetimepicker2设定。请求高手解决啊。shengri表中的birth字段为日期型。...
结束日期由datetimepicker2设定。请求高手解决啊。shengri表中的birth字段为日期型。
展开
展开全部
string sql = "Select * from shengri where between(birth," + "'" + dateTimePicker1.Value.ToShortDateString() + "','" + dateTimePicker2.Value.ToShortDateString() + "') order by birth ";
即:select * from shengri where between(birth,date1,date2) order by birth
没注意是delphi的,上一段的语法是c#,干脆你根据最后一句的样子,写delphi的吧
即:select * from shengri where between(birth,date1,date2) order by birth
没注意是delphi的,上一段的语法是c#,干脆你根据最后一句的样子,写delphi的吧
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询