我想把数据库中下面这几个字段为空的删除,下了下面的代码,执行完数据库没有改变阿,是不是空不能用''''表示阿?谢谢!
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
s:='delete from a01 where callsign='''' and voy='''' and port='''' and MV='''' and date='''' and re=''''';
ADOQuery1.SQL.Add(s);
ADOQuery1.execsql;
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
s:='delete from a01 where callsign='''' and voy='''' and port='''' and MV='''' and date='''' and re=''''';
ADOQuery1.SQL.Add(s);
ADOQuery1.execsql;
解决方案 »
- 在ie里输入地址就能进入网站,idhttp post的方式提示连接拒绝
- MDI窗体,打开子窗体出现问题~提示:Cannot make a visible window modal
- 跪求关于FastReport两个问题,在线等.......
- FastReport做交叉表时,能不能确定让每个band的宽度的大小,现在是根据band的内容自动确定的
- 李维今天在成都签名售书
- 如何声明Set_ReadOnly和Set_NotReadOnly这两个过程(在线等.......)
- RAVE報表問題
- 对 DATASET 有研究的请进。
- 关于Tdatetimepicker的显示格式问题
- 问一个极菜的问题:怎么才能删除Form?
- 帮忙看看这短代码,打开cmd.exe,定位在文件目录册,并写入文件名称
- 如何把一个附件挂到数据库中的某个字段里?
s:='delete from a01 where callsign is null and ....'
我用了
s1:='callsign is null and voy is null....'
s2:='re is null and ...'
s:=s1+s2;
ADOQuery1.SQL.Add(s);
ADOQuery1.execsql;
还是报超长的错误,该怎么解决阿?
ADOQuery1.SQL.Add(s1);
ADOQuery1.SQL.Add(s2);
ADOQuery1.SQL.Clear;
s1:='delete from a11t where carriercode is null and carriername is null';
s2:=' blno is null and cntno is null and typesize is null and disport is null and temp is null and oh is null and ol is null and ow is null and imdg is null and commodity is null and re is null'; ADOQuery1.SQL.Add(s1);
ADOQuery1.SQL.Add(s2);
ADOQuery1.execsql;
还是说超长阿