22,210
社区成员
发帖
与我相关
我的任务
分享
select a.str_deductbill_no, a.str_bill_no
from [sellrebate].dbo.t_deduct_account_detail a
where str_deductbill_no='200901070089'
select distinct a.str_deductbill_no
from [sellrebate].dbo.t_deduct_account_detail a
where str_deductbill_no='200901070089' and
a.str_bill_no not between '200812260000' and '200903259999'
order by str_deductbill_no
select distinct a.str_deductbill_no
from [sellrebate].dbo.t_deduct_account_detail a
where (a.str_bill_no not between '200812260000' and '200903259999')
and str_deductbill_no='200901070089'
order by str_deductbill_no
后面这个加上括号试一下.