Y
yangyj
Unregistered / Unconfirmed
GUEST, unregistred user!
各位朋友:
我要写一sql server 7.0 之查询:
select pjcb=round(sum(sail_total_day*b.carrypower)/天数之和day,1)
from shipdata a,shipqh b
where nianyue>=:nianyue1 and nianyue<=:nianyue2
其中:nianyue为表shipdata的字段,类型:char(6),含义:年月.
例如:nianyue>=‘199908’ and nianyue<=‘199912’
我的目的:根据参数:nianyue1和:nianyue2来写'天数之和day'.
例如:当nianyue1=‘199908’,nianyue2=‘199912时,
天数之和day=153天
请各位帮忙。谢谢!
我要写一sql server 7.0 之查询:
select pjcb=round(sum(sail_total_day*b.carrypower)/天数之和day,1)
from shipdata a,shipqh b
where nianyue>=:nianyue1 and nianyue<=:nianyue2
其中:nianyue为表shipdata的字段,类型:char(6),含义:年月.
例如:nianyue>=‘199908’ and nianyue<=‘199912’
我的目的:根据参数:nianyue1和:nianyue2来写'天数之和day'.
例如:当nianyue1=‘199908’,nianyue2=‘199912时,
天数之和day=153天
请各位帮忙。谢谢!