HI在这个查询中我得到一个错误'类型日期不是定义的系统类型'CHECK_DATE被定义为表中的日期时间。
var queryString = "select TIME from [PRO2].[OGEN].[EMR_PATIENT_CHECK_TRACKING] where MRN ='" + id + "' and HOUR='" + hour + "' and convert(varchar(10), cast(CHECK_DATE as date), 111)=convert(varchar(10),cast('"+date+"' as date), 111)"
知道我在这里做错了什么吗?使用sql server 2005
之前的代码是:
getcheckedTime = function (id,hour,date,fn) {
var request = new sql.Request(connection);
var checktime=[] ;
// console.log("hourrrrrrrrrrrrr"+hour+"date"+date);
if ((date=='undefined') || (date==null)) {
date=new Date();