SQL Access查询第一日期和截止日期为每个系列(C#.NET)
答
我有使用子查询
以下解决方案select t1.person_id,
t1.date as start_date,
(
select max(date)
from your_table t2
where t2.date > t1.date and t2.date < ALL(
select date
from your_table t3
where t3.first = 1 and t3.date > t1.date)
) as end_date
from your_table t1
where t1.first = 1
这是行不通的,因为它不是一个sql访问c#程序访问(它将与SQL服务器一起工作) – Fawzidi