sql如下,怎么将两个时间换成日期控件参数

SELECT TOP (10000000) [ryid]

      ,[ryxm]

      ,min([dlsj])as[dlsj]

      ,max([tcsj])[tcsj]

  FROM testS

  where [dlsj] between '2023-02-03' and '2023-02-09'

  group by ryid,ryxm

  order by dlsj desc

FineReport Vessel1213 发布于 2023-2-14 14:32
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
0
snrtuemcLv8专家互助
发布于2023-2-14 14:32

SELECT TOP (10000000) [ryid]

      ,[ryxm]

      ,min([dlsj])as[dlsj]

      ,max([tcsj])[tcsj]

  FROM testS

  where [dlsj] between '${开始日期控件名}' and '${结束日期控件名}'

  group by ryid,ryxm

  order by dlsj desc

最佳回答
0
用户6NWif5139660Lv6资深互助
发布于2023-2-14 14:33

SELECT TOP (10000000) [ryid]

      ,[ryxm]

      ,min([dlsj])as[dlsj]

      ,max([tcsj])[tcsj]

  FROM testS

  where [dlsj] between '${开始时间}' and '${结束时间}' 

  group by ryid,ryxm

  order by dlsj desc

最佳回答
0
Z4u3z1Lv6专家互助
发布于2023-2-14 14:33

SELECT TOP (10000000) [ryid]

      ,[ryxm]

      ,min([dlsj])as[dlsj]

      ,max([tcsj])[tcsj]

  FROM testS

  where [dlsj] between '${开始日期}' and '${结束日期}'

  group by ryid,ryxm

  order by dlsj desc

  • 2关注人数
  • 252浏览人数
  • 最后回答于:2023-2-14 14:33
    请选择关闭问题的原因
    确定 取消
    返回顶部