and Caller_id >'5750000'
and caller_id < 5789999
and Caller_id >'5970000'
and Caller_id <'5999999'
这几个条件不能同时成立,应该写成
and (Caller_id >'5750000'
and caller_id < 5789999
or Caller_id >'5970000'
and Caller_id <'5999999')
and caller_id < 5789999
and Caller_id >'5970000'
and Caller_id <'5999999'
这几个条件不能同时成立,应该写成
and (Caller_id >'5750000'
and caller_id < 5789999
or Caller_id >'5970000'
and Caller_id <'5999999')
这一段有问题:
and Caller_id >'5750000'
and caller_id < 5789999
and Caller_id >'5970000'
and Caller_id <'5999999'应该是:
and ((Caller_id >'5750000'
and caller_id < '5789999')
or
( Caller_id >'5970000'
and Caller_id <'5999999'))
and substr(Caller_ID, 1, 1) <> '9'
and substr(Caller_ID, 1, 1) <> '0'
是没用的, 楼主,你试试这个语句!Select * from Bill_List where substr(Caller_ID, 1, 3) <>'590'
and ((Caller_id >'5750000'
and caller_id < '5789999')
or
( Caller_id >'5970000'
and Caller_id <'5999999'))
order by Caller_id;
and substr(Caller_ID, 1, 1) <> '9'
and substr(Caller_ID, 1, 1) <> '0'
and substr(Caller_ID, 1, 3) <>'590')
or ((Caller_id >'5750000' and caller_id < 5789999 ) or (Caller_id >'5970000' and Caller_id <'5999999'))
order by Caller_id;
and substr(Caller_ID, 1, 1) <> '9'
and substr(Caller_ID, 1, 1) <> '0'
and substr(Caller_ID, 1, 3) <>'590'
是没有错的,错的是以下:
and Caller_id >'5750000'
and caller_id < 5789999
and Caller_id >'5970000'
and Caller_id <'5999999'
zhangshunshi(宇轩)应该没有错