sql2000中把条件billdate between intime and intime中的intime加上30天,i
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/17 22:30:11
sql2000中把条件billdate between intime and intime中的intime加上30天,intime是字符型,该怎么做?
我现在有个库存表kc,需要把kc表中的商品查看入库后近30天有没有销售,kc表记录的入库时间为字符型的字段intime,我现在想把他和销售表xs连接在一起查询销量,但是我在intime后+30提示‘在将 varchar 值 '2013-06-01' 转换成数据类型 int 时失败’,我的语句是这样写的select * from kc left join xs on kc.rec = xs.rec where xs.billdate between intime and intime +30,我该怎么写才能自动给intime加上30天呢?
我现在有个库存表kc,需要把kc表中的商品查看入库后近30天有没有销售,kc表记录的入库时间为字符型的字段intime,我现在想把他和销售表xs连接在一起查询销量,但是我在intime后+30提示‘在将 varchar 值 '2013-06-01' 转换成数据类型 int 时失败’,我的语句是这样写的select * from kc left join xs on kc.rec = xs.rec where xs.billdate between intime and intime +30,我该怎么写才能自动给intime加上30天呢?
![sql2000中把条件billdate between intime and intime中的intime加上30天,i](/uploads/image/z/19722487-31-7.jpg?t=sql2000%E4%B8%AD%E6%8A%8A%E6%9D%A1%E4%BB%B6billdate+between+intime+and+intime%E4%B8%AD%E7%9A%84intime%E5%8A%A0%E4%B8%8A30%E5%A4%A9%2Ci)
select * from kc left join xs on kc.rec = xs.rec where xs.billdate
between intime
and
left(convert(varchar,dateadd(day,30,convert(datetime,intime)),120),10)
between intime
and
left(convert(varchar,dateadd(day,30,convert(datetime,intime)),120),10)
Peine intime qui
SQL语言中,条件年龄BETWEEN AND的用法
Between You and I 歌词
He sits between you and I和He sits between you and me中哪一个对?为什
between...and...中的and可不可以换成with?
"between and "在oracle 9i中的范围是包括两端的值么?
数据库中,between…and相当于数学中的开区间还是闭区间?
ORACLE中between…and...是SQL语句中的吗?还是仅限于SQL*PLUS里?
between ..and..之后还要跟个条件怎么办?
I learn how to balance between study and entertainment中how做句
He sits between Daniel and me还是between Daniel and me应该and I
英语翻译还是 between you and mebetween you and i