loadrunner 27257:请写一SQL语句

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/02 06:17:56
表名:商品表
字段:
商品名称
进货日期
进货时间
条件是:从"商品表"中选取时间段在2005年3月5日 3:30分到2005年10月5日8:00分的所有记录
access 数据库

select * from 商品表 where 进货日期>=#2005-3-5-# and 进货时间>=#3:30# Or 进货日期<=#2005-10-5-# and 进货时间<=#8:00#
不知道对不对...
进货日期
进货时间
这两个字段应该是一个字段的

我也想学这个呢。你是学生吧。哈。不会是学校的作业不会作了,拿到这里来让别人帮你作吧。
我也等等看。看有没有好的答案

select * from c_user where c_time between #"&c_time&"# and #"&c_time1&"#

读取两个日子之间的数据 c_tim - c_time1

如果是ACCESS数据库就是
select * from c_user where c_time between #"&c_time&"# and #"&c_time1&"#
如果是SQL SERVER数据库就是
select * from c_user where c_time between '"&c_time&"' and '"&c_time1&"'

oracle
建表时,进货日期和进货时间都置成varchar2型
查询条件:
where in_date||' '||in_time>'2005-03-05 033000' and in_date||' '||in_time<'2005-10-05 080000'

select *;
from table 商品表;
where 进货日期>{05/03/25}and 进货日期<{05/10/05}and 进货时间>03:30 and 进货时间<08:00