|
SELECT TOP 1 值
FROM 表1 WHERE 表1.时间<=#9/3/2002 16:35:00#
ORDER BY 表1.时间 desc
上面的语句能返回小于等于9/3/2002 16:35:00的值,结果正常
SELECT 表2.时间, (select top 1 值 from 表1 where 表1.时间<=表2.时间 order by 表1.时间 desc) AS 数值
FROM 表2
这样书写却只能返回条件小于表2.时间的值, 不解...
|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )
GMT+8, 2024-5-25 08:45 , Processed in 0.053809 second(s), 15 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.