AND (ISNULL(@DateType,-1)=-1 or (@DateType=1 AND ((ISNULL(@StartDate,'')='01  1 1900 12:00AM' OR A.CreateDate>=@StartDate+' 00:00:00' ) AND (ISNULL(@EndDate,'')='01  1 1900 12:00AM' OR A.CreateDate<=@EndDate +'23:59:59')))
or (@DateType=2 AND ((ISNULL(@StartDate,'')='01  1 1900 12:00AM' OR A.SolveDate>=@StartDate+' 00:00:00' ) AND (ISNULL(@EndDate,'')='01  1 1900 12:00AM' OR A.SolveDate<=@EndDate +'23:59:59')))
or (@DateType=3 AND ((ISNULL(@StartDate,'')='01  1 1900 12:00AM' OR A.CloseDate>=@StartDate+' 00:00:00' ) AND (ISNULL(@EndDate,'')='01  1 1900 12:00AM' OR A.CloseDate<=@EndDate +'23:59:59')))
)

 

sql多条件检索

and (ISNULL(@DateType,-1)=-1 or (@DateType=1 or createdate>@startDate))

相关文章:

  • 2021-06-11
  • 2021-06-13
  • 2022-01-17
  • 2021-12-03
  • 2021-09-27
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2022-01-25
  • 2022-12-23
相关资源
相似解决方案