//专用于处理date public override string GetDateSql(Sql_Where where) { string datesql = ""; if (!string.IsNullOrEmpty(where.stime)) { datesql += where.field + "> str_to_date('" + where.stime + "','%Y-%m-%d %k:%i:%s')"; } if (!string.IsNullOrEmpty(where.etime)) { if (!string.IsNullOrEmpty(where.stime)) { datesql += " AND "; } datesql += where.field + "< str_to_date('" + where.etime + "','%Y-%m-%d %k:%i:%s')"; } datesql = " " + where.join + " (" + datesql + ")"; return(datesql); }
public override string GetDateSql(Sql_Where where) { string datesql = ""; if (!string.IsNullOrEmpty(where.stime)) { datesql += where.field + ">'" + where.stime + "'"; } if (!string.IsNullOrEmpty(where.etime)) { if (!string.IsNullOrEmpty(where.stime)) { datesql += " AND "; } datesql += where.field + "<#" + where.etime + "#"; } datesql = " " + where.join + " (" + datesql + ")"; return(datesql); }
//专用于处理date public override string GetDateSql(Sql_Where where) { //SELECT * FROM ZL_USER WHERE (LASTLOGINTIME > to_date('2016-02-17 00:00:00','yyyy-mm-dd hh24:mi:ss') and LASTLOGINTIME <to_date('2016-02-18 23:59:59','yyyy-mm-dd hh24:mi:ss')) string datesql = ""; if (!string.IsNullOrEmpty(where.stime)) { datesql += where.field + "> to_date('" + where.stime + "','yyyy-mm-dd hh24:mi:ss')"; } if (!string.IsNullOrEmpty(where.etime)) { if (!string.IsNullOrEmpty(where.stime)) { datesql += " AND "; } datesql += where.field + "< to_date('" + where.etime + "','yyyy-mm-dd hh24:mi:ss')"; } datesql = " " + where.join + " (" + datesql + ")"; return(datesql); }
public abstract string GetDateSql(Sql_Where where);
public override string GetDateSql(Sql_Where where) { throw new NotImplementedException(); }