P
porsche
Unregistered / Unconfirmed
GUEST, unregistred user!
我用BDE联foxpro本地表,
s:='select hd_date+hd_begin,hd_bj,hd_thsc,hd_thsc,hd_sum from cx_hd_dj where hd_dhh='+''''+phone_no+'''';
s:=s+' and ptsf_ny='+''''+aaa+'''';
s:=s+' and Copy(hd_bj,1,1)<>'+''''+if1+'''';
s:=s+' and Copy(hd_bj,1,1)<>'+''''+if2+'''';
s:=s+' and Copy(hd_bj,1,4)<>'+''''+if3+'''';
结果是:
select hd_date+hd_begin,hd_bj,hd_thsc,hd_thsc,hd_sum from cx_hd_dj
where hd_dhh='6510104' and ptsf_ny='200110' and Copy(hd_bj,1,1)<>'0'
and Copy(hd_bj,1,1)<>'1' and Copy(hd_bj,1,4)<>'9163'
主要是是copy函数出错,
Copy(hd_bj,1,4)<>'9163'这里我应该如何写?
s:='select hd_date+hd_begin,hd_bj,hd_thsc,hd_thsc,hd_sum from cx_hd_dj where hd_dhh='+''''+phone_no+'''';
s:=s+' and ptsf_ny='+''''+aaa+'''';
s:=s+' and Copy(hd_bj,1,1)<>'+''''+if1+'''';
s:=s+' and Copy(hd_bj,1,1)<>'+''''+if2+'''';
s:=s+' and Copy(hd_bj,1,4)<>'+''''+if3+'''';
结果是:
select hd_date+hd_begin,hd_bj,hd_thsc,hd_thsc,hd_sum from cx_hd_dj
where hd_dhh='6510104' and ptsf_ny='200110' and Copy(hd_bj,1,1)<>'0'
and Copy(hd_bj,1,1)<>'1' and Copy(hd_bj,1,4)<>'9163'
主要是是copy函数出错,
Copy(hd_bj,1,4)<>'9163'这里我应该如何写?